How to use an SVG file in a SvgIcon in Material-UI -


i've got svg file , want make svgicon component out of it, how should that?

in documentation, examples use either predefined material icons or strange notation of <path d="m10 20v-6h4v6h5v-8h3l12 3 2 12h3v8z" /> have no idea is!

<path /> svg path, i.e. internal bits of svg. svgicon component should able take path, doesn't :(

instead can create component https://github.com/callemall/material-ui/blob/56c113217d7d05d8bb0712771b727df81984d04b/src/svg-icons/action/home.js

with svg source in place of path. (i recommend minifying bit using https://jakearchibald.github.io/svgomg/)


Comments