@berlitz/icons
v3.4.3
Published
Icons component for the Max Design System
Downloads
4,912
Readme
Max Icons
Transform SVGs into React components 🦁
@berlitz/icons is the icon system for the Max design system. It relies on SVGR to do the heavy lifting with minor tweaks, such as a custom template, to customize to our needs. See the full API here.
Workflow
- Add SVG fille to
src/svgdirectory - Replace all desired fill values with
currentColor, this allows the SVG to inherit from the parent's font color - run
yarn iconsin the root of the max repository, oryarn svgrfrom within the icon component directory itself - this will..
- Loop over each .svg in the
/src/svgdirectory - Optimize it through a CLI version of SVGO
- Run it through a custom template
template.js - Export resulting React components to the
/src/componentsdirectory
- Loop over each .svg in the
- Add your new icon to the
src/indexexports (TODO: this could be automated) - Update your new icon to
Icons.story.jsto update story.
