Last modified: 4/Oct/2024
Adding new icons
All the icon-related sources are in the
./packages/icons
svg
An SVG source should look like this:
<svg viewBox="0 0 24 24" fill="none"> <path d="M12 9.14286H8.14286V13H..."/> </svg>
- Put the SVG file into the
./packages/icons/svg
- Run
$ npm run tidy-up-svg-icons
to remove unnecessary group tags and attributes - Run
$ npm run generate-icons
to create React components from the SVG files - Release the changes
#Background
We use SVGO library to tidy up SVG sources and SVGR to create React components from SVG files.
There is an additional step in the process: we regenerate the typescript types at React component generation, so we have proper IntelliSense suggestions when using the
Icon