How to import Material UI icons
lucasbento opened this issue · comments
How do I import Material UI icons from the npm package?
Material UI syntax is import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert';
which does not work on webpack-bin, is there another way for it?
Thank you.
Interested in answer, i got same error as well ...
@Sharlaan: I'm currently using only material icons with <FontIcon />
component, working fine. :)
Can you elaborate with some code example please ?
I usually don't use css at all (CSSinJS), so not sure if this needs to use some css classes + url (and which url ?) ?
@Sharlaan: something like this: http://www.webpackbin.com/4ki4undA-
Thanks deeply for the Code Example and fast answers :)
It works
Just a warning, if material icon 's name has a '-', replace it with underscore '_' like this:
const DropDownArrow = <FontIcon className='material-icons'>arrow_drop_down</FontIcon>
@lucasbento Hey the link you put up seems to be broken. Do you still have the code to share?
The link is broken.