Skip to content

etaybarzilay89/svg2react-icon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg2react-icon

A library to generate reusable React Icon components from raw SVG icons

Features

  • 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

Install

npm install --save-dev svg2react-icon

Sample usage

In your package.json:

{
  "scripts": {     
    "build": "svg2react-icon [inputDir] [outputDir] [isTypeScript (optional)]",
    ...
  }
}

Or within the command-line:

svg2react-icon [inputDir] [outputDir] [isTypeScript (optional)]

License

MIT

About

Generate React icon components from SVG raw files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 94.8%
  • TypeScript 4.3%
  • CSS 0.9%