-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Button] using nested custom color
#30420
Comments
We had some discussion around this when we were working on the system. The main problem, as you already pointed out, is that the The |
Absolutely, and that's why it's even more frustrating not to be able to use color shades. At the moment, I'm redefining another palette: {
mode: 'light',
secondary: {
main: '#785447',
200: '#BBA9A3',
},
secondary200: {
main: '#BBA9A3',
},
} |
Good news, I just noticed that |
I'm having the same issue as @RemyMachado - is there any update to this? Or is it in progress as the Typography seems to support this already? :) Thanks! |
Duplicates
Latest version
Summary 💡
Currently, we can define new colors with the theme:
https://mui.com/customization/palette/#adding-new-colors
Unfortunately it seems that we can't use the nested property directly within the
color
prop of theButton
It would be nice if we could use it in the same way we use
sx
prop.Examples 🌈
Motivation 🔦
I know it's two very different implementations between the
sx
andcolor
properties, but maybe it would help having a common API.To be honest, I setup my whole theme thinking I would be able to pass nested custom colors. I was quite disappointed when I found out it was only possible within the
sx
propThe text was updated successfully, but these errors were encountered: