FrontPastel/node_modules/@mui/utils/ClassNameGenerator/ClassNameGenerator.js

17 lines
433 B
JavaScript
Raw Normal View History

2024-04-17 13:55:11 +00:00
const defaultGenerator = componentName => componentName;
const createClassNameGenerator = () => {
let generate = defaultGenerator;
return {
configure(generator) {
generate = generator;
},
generate(componentName) {
return generate(componentName);
},
reset() {
generate = defaultGenerator;
}
};
};
const ClassNameGenerator = createClassNameGenerator();
export default ClassNameGenerator;