-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Ability to create custom classes in overrides #15454
Comments
This is technically possible currently: https://codesandbox.io/s/zyjwxqj04. However it relies on implementation details. We're working on a better |
Could it be a duplicate of #13875? The success, danger, warning and info are values I think that we should support by default. |
@eps1lon @oliviertassinari |
Is this in progress? Otherwise I would like to contribute. |
I'm closing for #13875. We have solved most of the infrastructure issues. Now, it's about making sure it works end-to-end with each use cases |
Expected Behavior 🤔
Addition of an unknown class in overrides(or elsewhere), should make it possible to use to the given className matching prop on a component.
Current Behavior 😯
It currently throws a warning, saying that the class you're trying to override doesn't exist. Which makes sense!
Examples 🌈
Theme
Component
Context 🔦
I find myself wanting to use additional colors (eg. green for success) on components like Typography on occasion, and noticed it figures out the color by matching capitalized props against the classes.
This presented me with the idea of adding my own prop (colorSuccess), in the hopes that I would be able to use it globally, on a Mui imported component.
This however, doesn't seem possible today. Unless I've missed something?
I could see an argument against this, (transparency?), however in a large project with several people, this would be a pretty dope feature, since it prevents you from having to repeat class implementations (or create yet another file in /components/).
Thanks in advance!
The text was updated successfully, but these errors were encountered: