Code Style - SVG
- Where possible use SVG icons from Material Icons
- If custom icons are needed, use SVG files
- Always use
Icon
in the name of the SVG file - Always use
currentColor
for the fill color - Always change default sizes to
1em
to allow for easy scaling
SVG in JSX
Section titled “SVG in JSX”When using SVGs in JSX, you need to convert the SVG.
JSX doesn’t support SVGs directly because JSX is using camelCase
for attributes instead of kebab-case
.