I\'ve got an SVG file and I want to make an SvgIcon component out of it, how should I do that?
In the documentation, all the examples use either predefined Material Icon
is an SVG path, i.e. the internal bits of the SVG. the SvgIcon
component really should be able to take a path, but it doesn't :(
instead you can create a component like https://github.com/callemall/material-ui/blob/56c113217d7d05d8bb0712771b727df81984d04b/src/svg-icons/action/home.js
with your svg source in place of the path
. (I recommend minifying it a bit using https://jakearchibald.github.io/svgomg/)