Code Style - SVG
- Where possible use SVG icons from Material Icons
- If custom icons are needed, use SVG files
- Always use
Iconin the name of the SVG file - Always use
currentColorfor the fill color - Always change default sizes to
1emto 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.