Page MenuHomec4science

generateUtilityClass.js
No OneTemporary

File Metadata

Created
Mon, Jan 27, 05:30

generateUtilityClass.js

import ClassNameGenerator from '../ClassNameGenerator';
const globalStateClassesMapping = {
active: 'active',
checked: 'checked',
completed: 'completed',
disabled: 'disabled',
error: 'error',
expanded: 'expanded',
focused: 'focused',
focusVisible: 'focusVisible',
required: 'required',
selected: 'selected'
};
export default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {
const globalStateClass = globalStateClassesMapping[slot];
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
}

Event Timeline