SVGR is used to generate the icons from svg files, provides a simple way to optimise svg files and use them in your application.
Follow the following step to add a new icon to your application:
- Create a new svg file in the
svgsdirectory. - Naming the file should be the same as the icon name excluding icon prefix. e.g. if you want to add a new icon named
<IconFacebook />then the file name should befacebook.svg. - Run
buildcommand in icons directory to generate the icon component. - Add the icon component to your application.
ViteJS is used to generate the icons showcase page.
- Run
npm run build:iconsto generate the icons that will be used by the showcase page. - Run
npm run devto start the server and open the page in your browser.
- Go to
data/tags.tsand add the new icon name along with thetagsarray. - If you want to display icon as "new", just add
newin thetagsarray. - e.g.
'facebook' : ["faang", "social", "new"]icon will be displayed as "new" in the showcase page.