react-svg
react-svg copied to clipboard
Ignore css properties starting with '-' by default
Should be quite self explanatory:
Inkscape for example might add something like -inkscape-stroke to a style attribute of a path, this results in
react-dom.development.js:86 Warning: Unsupported style property -inkscape-stroke. Did you mean InkscapeStroke?
at path
at svg
at ReactInlineSVG (http://localhost:5173/node_modules/.vite/deps/react-inlinesvg.js?v=be6f02d0:889:5)
at InlineSVG (http://localhost:5173/node_modules/.vite/deps/react-inlinesvg.js?v=be6f02d0:1081:11)
at label
at div
at Unmute (http://localhost:5173/src/components/Unmute.tsx:25:11)
at div
at App (http://localhost:5173/src/App.jsx:54:21)
Even though this is not a direct fault of react-svg this component could guard against it, by just remove attributes starting with -. This is in fact a vendor prefix.
This should be the default.