-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Fix style overrides for Ra* components #7616
Conversation
c558aa5
to
838b588
Compare
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.
Almost there! Sorry I did not see the last point that immediately
838b588
to
1423fe7
Compare
Have you tried those modifications? I tried converting the demo theme accordingly and it does not seem to work |
1423fe7
to
e1931b2
Compare
I have tested them by using basically the same code as in the sandbox on #7604 applied to the simple example: const theme = _.merge({}, defaultTheme, {
components: {
MuiButton: {
styleOverrides: {
root: {
// works as expected
border: "5px solid red"
},
startIcon: {
// works as expected
color: "red"
}
}
},
RaList: {
styleOverrides: {
root: {
// works as expected
backgroundColor: "green"
},
content: {
// does not work
backgroundColor: "red"
}
}
}
}
}); I hadn't seen the demo theme before, will try to update it as well (probably should be part of this PR). |
e1931b2
to
e1a618f
Compare
Now the demo theme is updated and works. |
Thanks for your contribution. But I'm -1 for this change, for the reasons I explained in #7604. |
As explained in #7604, we won't merge that change in master. Thanks for your contribution anyway! |
This pull request allows using
styleOverrides
from MUI themes to override the styles of all classes in react-admin components, as opposed to just the root class previously.Fixes: #7604