2.0.3 • Published 6 years ago

@lokua/mdi-svg v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

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"
}