-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] Add unstable_ClassNameGenerator
API
#29051
[core] Add unstable_ClassNameGenerator
API
#29051
Conversation
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
docs/src/pages/guides/classname-generator/classname-generator.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Benny Joo <sldisek783@gmail.com> Co-authored-by: Marija Najdova <mnajdova@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 👍
unstable_ClassNameGenerator
APIunstable_ClassNameGenerator
API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure it fixes the problem of @smora-gh? They seem to need multiple prefixes on the same page. The PR uses a global singleton, it will be unique for the whole page.
IMHO, the only real use case for a class name generator is white labeling. People that build a design system and don't want to see MUI mentioned in the DOM. I fail to envision other use cases.
```diff | ||
+import { outlinedInputClasses } from '@mui/material/OutlinedInput'; | ||
|
||
const theme = createTheme({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A general rule, there is always blank space in place of the + or - in the git diff
const theme = createTheme({
close #28550
As mentioned in #28550 (comment). All of the global class name is generated from
generateUtilityClass
, so providing some global object to manipulate class name generation sounds like a good solution (since the class name does not need run-time changing).utils
folder so developers can import it like thisMui-disabled
does not have an impact from ClassNameGenerator*Classes
Autocomplete
DialogContent
AvatarGroup