@lokua/mdi-svg
v2.0.3
Published
flat folder of camelcased, material-design-icons svg files
Downloads
5
Readme
mdi-svg
Contains a flat folder of camel cased, material-design-icons svg files.
Install
npm:
npm i @lokua/mdi-svg --save
yarn:
yarn add @lokua/mdi-svg --save
Example
Assuming you have svg loading support in webpack or similar, you can make a simple icon component with React:
export default ({ name }) => (
<div
dangerouslySetInnerHTML={{ __html: require(`mdi-svg/svg/${name}.svg`) }}
/>
)
Demo
Open demo/index.html
to see all icons and their names in your default browser.
Clicking an icon thumbnail will copy it to your clipboard.
TIP:
Add the following to your project package.json scripts section:
"scripts": {
"icons": "open ./node_modules/@lokua/mdi-svg/demo/index.html"
}