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
npm install --save-dev svg2react-iconIn your package.json:
{
"scripts": {
"build": "svg2react-icon [inputDir] [outputDir] [isTypeScript (optional)]",
...
}
}Or within the command-line:
svg2react-icon [inputDir] [outputDir] [isTypeScript (optional)]MIT