npm install svg2react-icon-mod
> A library to generate reusable React Icon components from raw SVG icons
* Create a React Icon component file for each raw SVG icon file
* Rename illegal SVG attributes
* Optimize the SVG (remove comments, unnecessary parts, etc)
* Remove colors so that the parent's font-color will be cascaded to the icon
Optional* - output TypeScript components
``bash`
npm install --save-dev svg2react-icon
In your package.json:
`js`
{
"scripts": {
"build": "svg2react-icon [options]
...
}
}
Or in the command-line:
`console`
svg2react-icon [options]
Options:
`console``
--typescript generate TypeScript components instead of JS
--monochrome strip all fill and stroke attributes
--named-export use named export instead of export default
MIT