-
-
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
[theme] Add base color palette type to components #26697
Conversation
Details of bundle changes (experimental) @material-ui/lab: parsed: -0.16% 😍, gzip: -0.05% 😍 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@siriwatknp the list looks solid. I would maybe add the |
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.
For the color demos, usually, we have only been shown 1 or 2 custom colors. Do we need to show all the colors of the palette? It seems to make the code preview of the demo more challenging to process for the developers. And with live edit #24640, developers will be able to quickly try the value they need. If your intent is visual regression, then I would propose we add custom visual snap (but not in the docs).
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
My intention is to show that the component support the color in the palette. What if the demo show one more color like <Button color="secondary">
<Button color="success"> |
We could have two, yeah, and for the button, maybe them all (it's a button, quite a unique component, but not sure it would be better). For the others, I would encourage againt. In any case, I think that we should always have an inline preview of the demo. If the demo becomes too long preventing it to display (limit around 20 lines). Then it's not flying, and two colors is likely more than enough. |
I checked, all of the Color demo has inline preview so 2 colors sounds good. |
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.
Agree, it will be fixed in #26817 😊 |
first step toward #24778
preview https://deploy-preview-26697--material-ui.netlify.app/
Changes in this PR
For each component
${Component}.js
${Component}.d.ts
<Component color />
tocolor-palette-prop.spec.tsx
Components
These are the proposed components that should support color palette in the theme
(
primary, secondary, error, info, success, warning
).Likely to appear in Dashboard and used as status
Common
Form controls
*Components that does not support all color palette type
Once the list is finalized, then fix the types and missing classes for the components.