-
-
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
Allow to pass mixins as a function to createMuiTheme() #18389
Conversation
9400f92
to
24263d3
Compare
Details of bundle changes.Comparing: 64ae0c6...c4e6b7e
|
24263d3
to
c4e6b7e
Compare
@koistya Could you expand on the use-case? |
I don't think that we should move forward, as is. in #18219, we introduce the support of multi arguments for the const theme = createMuiTheme({}, theme => ({ mixins: { foo: 'bar' } })); The alternative is to apply the same pattern as |
const theme = createMuiTheme({}, theme => ({ mixins: { foo: 'bar' } })); Yeah, that would even be better. Good to know. |
@koistya It's not supported, it's an idea. |
What's wrong with the two stages approaches? const theme = createMuiTheme();
theme.mixins.element = {
padding: theme.spacing(1),
[theme.breakpoints.up('sm')]: {
padding: theme.spacing(2),
},
}; |
@oliviertassinari two stage approach does work for me. Will switch to |
@mbrookes Any preference for the next step? |
Two-stage seems good enough to me, now that I've grasped the use-case, but your call. |
Ok, it can wait then |
Usage Example