jhamlet / svg-react-loader

Webpack SVG to React Component Loader
MIT License
559 stars 82 forks source link

May I have an example showing on how to pass props down to SVG component? #92

Open sivadass opened 6 years ago

sivadass commented 6 years ago

I want to pass the state produced by the parent component like isActive state to the child SVG component as props?

I tried passing the props to child component, when i am trying to access the props inside SVG component, it produces the error below:

unquoted attribute value

May I have an example or guidelines on how to achieve this?

vknyshuk commented 5 years ago

See examples here https://medium.com/@ericschwartz7/using-react-with-svg-57958f16e68a