-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[PropTypes] Add variants primary and secondary to proptypes #12990
Comments
@Abbo44 At work, we have been writing a wrapper component to solve this problem. I'm eager to explore the alternatives to this strategy. |
I don't know exactly the alternatives but I think it's important to have the choice to display the variants of the primary and secondary color. It could also be an other optionnal props called |
To be honest I'm not a fan of style props. You can already do this by passing your own className with withStyles and We have to define new classNames and props which increases API surface and bundle size for everyone when this feature is already supported. |
Duplicate of #13875 |
It would be great if we could add more types of props color to the color props
Expected Behavior
I want to be able to display on my components who have color props:
Current Behavior
I can only display my primary and my secondary color.
export namespace PropTypes { type Color = 'inherit' | 'primary' | 'secondary' | 'default'; }
Examples
https://material.io/design/color/the-color-system.html#color-theme-creation
For example based on the material spec, you can make a color theme for your app using your primary color, as well as dark and light primary variants.
Context
Sometimes, I would like do display some components with some variants color and I can't display those variants with the current color PropsTypes.
The text was updated successfully, but these errors were encountered: