question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Two instances of MuiSvgIcon in project.

See original GitHub issue
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

There are 2 instances of MuiSvgIcon <style ... data-meta="MuiSvgIcon">...</style> in project head one with MuiSvgIcon-colorPrimary-2 class which is setting icons color to default MUI blue color. Some icons have proper styling - color from my theme and some of them have default material blue color.

Expected Behavior 🤔

All icons have color set by theme and there is only one instance of <style ... data-meta="MuiSvgIcon">...</style>.

Steps to Reproduce 🕹

It’s hard to reproduce as it’s large project.

Context 🔦

i’m trying to have consistent UI without using style or with-styles

Your Environment 🌎

Tech Version
Material-UI v4.7.1-0
React 16.9
MUI Icons 3.0.1-0
Browser chrome - latest

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
oliviertassinaricommented, Feb 17, 2020

@MMaicki Make sure you bundle a single version of the modules, it should solve your issue.

0reactions
RobertaMelocommented, Aug 17, 2021

I had this problem when I was using the react-redux-toastr and I discovered that I was called this tag <Toaster /> out of (or before) of called the tag to <MuiThemeProvider >, maybe your problem be with some import.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Two instances of MuiSvgIcon in project. · Issue #19702 - GitHub
</style> in project head one with MuiSvgIcon-colorPrimary-2 class which is setting icons color to default MUI blue color. Some icons have proper ...
Read more >
How to change the .MuisvgIcon-root class styles to override ...
I'm using Material-ui for UI components in my create-react-app project. As ...
Read more >
React Icon Component - Material UI - MUI
These components use the MUI SvgIcon component to render the SVG path for each icon, ... For instance, you can display two-tone icons...
Read more >
React MUI SvgIcon API - GeeksforGeeks
Step 1: Create a react project using the following command. ... Example 2: In the following example, we have SvgIcon in different colors....
Read more >
MUI Icons in React - Refine Dev
Step 2 - Install the MUI Icons package​. Install the MUI icons themselves into your project with the following command: use npm; use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found