mmsvg
v1.5.3
Published
Mithril Material Design SVG icons
Downloads
7
Maintainers
Readme
Mithril Material Design SVG icons
Material Design icons generated by mithril-icon-builder.
Icon repositories
Included are icons from:
- google/material-design-icons
- zavoloklom/material-design-iconic-font
- Templarian/MaterialDesign
- Zondicons
Icon files
The SVG icons are embedded as Mithril elements. For instance the file with the home icon contains:
var m = require('mithril');
module.exports = m.trust('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
Using the icons
The icon files are in es5 module format and can be used in es5 and es6 projects:
import iconHome from "mmsvg/google/msvg/action/home";
m(".icon-home", iconHome);
Generates:
<div class="icon-home">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"></path>
</svg>
</div>
License
MIT