You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm. I spent about 3 hours creating a custom template to append the className prop to the SVG class attribute.
But, I realized that is not necessary!
You shouldn't add the class attribute to the SVG file.
Because it doesn't make sense!
You can use the class attribute for path elements; SVGR will convert it to the style attribute and make it inline.
But, the class attribute for the SVG element is useless. Because the SVG file is in a separate context from the page. Like an isolated component.
Unless you directly inject an SVG element to the code which means you do not use the SVGR in this case.
Hmm. I spent about 3 hours creating a custom template to append the className prop to the SVG class attribute. But, I realized that is not necessary! You shouldn't add the class attribute to the SVG file. Because it doesn't make sense!
You can use the class attribute for path elements; SVGR will convert it to the style attribute and make it inline.
But, the class attribute for the SVG element is useless. Because the SVG file is in a separate context from the page. Like an isolated component. Unless you directly inject an SVG element to the code which means you do not use the SVGR in this case.
馃悰 Bug Report
need props className append to svg classes , but It is now being replaced props className to svg class
To Reproduce
Expected behavior
os
The text was updated successfully, but these errors were encountered: