Closed ghost closed 2 years ago
The icon might have some properties that either svgr
or react-native-svg
don't know how to handle.
Could you link the SVG file in question here?
Here it is, undraw_job_hunt.zip
-darkreaderInlineFill
is not a valid style. Like the error screenshot you linked is doing a pretty good job of showing you the offending token, and if you did a little searching you'd find it's not a valid style attribute. This style is using a prefix -
and the translation of the style attribute to a prop should transform this without error, although even if it did, React is going throw an error immediately because it's not a valid style prop.
On the one hand, if this project were to update to the latest SVGR, you'd no longer have this syntax error (you can try this on the SVGR Playground, and it transforms style="-darkreaderInlineFill: #1d2223"
to style={{ DarkreaderInlineFill: '#1d2223' }}
).
But you'd still have the React error to immediately contend with. You need to clean your input SVGs of any garbage if you want this to work properly.
I will try to get a new version of the transformer out with a newer SVGR soon.
Thank you all.
This is now fixed in the latest version.
Bug
When I try to add an icon from undraw.co the app breaks.
The app is working with different icons.