garth / snabbdom-material

Stateless UI components for snabbdom that follow material design
http://garth.github.io/snabbdom-material/
MIT License
49 stars 6 forks source link

No Icon component #1

Closed delaneyj closed 8 years ago

delaneyj commented 8 years ago

Examples use an Icon component but one is not exposed.

It would be great to use extended set of icons cause the official ones are missing a ton of really useful ones like brands and is ~1500 icons vs 96.

require('mdi/css/materialdesignicons.css');
const Icon = Component(({children})=> {
    return (
        <i className={`mdi mdi-${children}`}/>
    )
});

//Example
<Icon>github-circle</Icon>

Seems to work as desired.

garth commented 8 years ago

Icon's are very project specific. Perhaps a set of instructions on how to do it could be included? Even the component could be included and you just need to use icomoon to select your project icons?

delaneyj commented 8 years ago

Seems like the materialdesignicons fits the bill of both being material styled and a large set to choose from. My only real concern is the examples are using components not included and won't work for newcomers.

garth commented 8 years ago

ok, I'm in the process of moving the example <Icon name="menu"/> into the lib and will include a prepared standard icon set and with instructions on how to customise them.