-
-
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
How to apply to material-ui-icons global MuiSvgIcon styles from the theme #8458
Comments
The override should be working as expected, please provide a reproduction example if it doesn't. |
@palaniichukdmytro - any chance you are running v1 and v0.1 side by side (given you are using material-ui-next) if so material-ui-icons can bind to the wrong version of material-ui. See the discussion here #7195 (comment) |
@eyn I have been facing this issue yesterday installing admin-on-rest. I couldn't use your webpack plugin nor a babel plugin to solve the problem. I'm gonna make a change to |
@oliviertassinari - yeah I have a create-react-app project where I just ended up coping the whole of material-ui-icons into the source code for now and changed the import. You solution in material-ui-icons looks like a better option! |
@eyn Indeed I use both versions v1 and v0.1. So I agree that is great solution to changed the import, but better to change in directly material-ui-icons |
@palaniichukdmytro Here is the PR #8473 |
So now, we can use import SvgIcon from 'material-ui-next/SvgIcon'
global.__MUI_SvgIcon__ = SvgIcon |
Would the above fix the following issue? I have been using v1, and i'm trying to add a component from the community that only supports 0.x. TypeError: Cannot read property 'svgIcon' of undefined |
@rdegorter I'm having this issue and rather than updating our somewhat complex build process, I simply grabbed the SVG code for each icon I'm using directly from material-ui-icons and dropped that into my components in place of named |
Upgrading to beta 41 solved the problem! |
How to apply to material-ui-icons global MuiSvgIcon styles from the theme
Expected Behavior
The MuiSvgIcon should override in theme both simple SvgIcon with path, and material ui icons, but overrides only SvgIcon
not
Current Behavior
I've created createMuiTheme, and try to overrides material-ui-icons and apply new styles,
Context
Your Environment
The text was updated successfully, but these errors were encountered: