Svg to JSX
Simple extension to convert your svg file to react component
Features
- converts svg syntax to valid jsx by replacing invalid svg attribute to valid jsx attribute for ex. inner-width -> innerWidth
- converts style to valid jsx style object
- change file extension from svg to .js
- you can choose the file type between .js and .ts - Upcomming
- Always Capitalize first letter of component name to make it valid react component.
how to use
- Hit
cmd+shift+p in mac or ctl+shift+p in windows or linux to open command palette.
- Type
svgToReact , select svgToJsx: convert this svg to react component once it appears.
- Tada! your react component is ready!
Release Notes
Users appreciate release notes as you update your extension.
1.0.1
- fixed wrong naming issue in window os and linux.
- added full attribute support.
Say Hi!, send suggestion or report a bug
You can contact me at
prabalsaxena2@gmail.com
Enjoy!
| |