Open ydrezende opened 2 years ago
The program I used to author my SVG exported the file with fill color declared inside the style property like so:
style="stroke:none;fill:#000;fill-opacity:1;stroke-opacity:1"
The replaceAttrValues does not work with this method, and manually changing this fill to be declared as a property of the SVG's path worked fine.
replaceAttrValues
Besides changing all my SVGs manually, is there a better method for me to get fill color as a prop on my SVG components?
Hello @ydrezende!
The replaceAttrValues feature is part of SVGR, so it would probably be a good idea to open this question in https://github.com/gregberge/svgr
The program I used to author my SVG exported the file with fill color declared inside the style property like so:
style="stroke:none;fill:#000;fill-opacity:1;stroke-opacity:1"
The
replaceAttrValues
does not work with this method, and manually changing this fill to be declared as a property of the SVG's path worked fine.Besides changing all my SVGs manually, is there a better method for me to get fill color as a prop on my SVG components?