• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TeamWertarbyte/mdi-material-ui: Material-UI SvgIcon components for Material Desi ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

TeamWertarbyte/mdi-material-ui

开源软件地址(OpenSource Url):

https://github.com/TeamWertarbyte/mdi-material-ui

开源编程语言(OpenSource Language):

JavaScript 97.5%

开源软件介绍(OpenSource Introduction):

Material Design Icons for Material-UI

Material Design Icons version Material Design Icons version

This module provides Material-UI <SvgIcon /> components for all Material Design Icons. This is pretty handy if you use React and Material-UI to build a web app and run out of icons.

While this module contains wrappers for all icons, alias names are not included. For example, the plus icon is aliased as add, but only the plus icon is exported.

Installation

npm install mdi-material-ui --save

There are different major versions of this package, each one for different Material-UI releases. Note that this project does not follow semantic versioning. If Material Design Icons removes or renames icons, it will still be a minor version bump.

Material-UI mdi-material-ui npm tag
^5.0.0 npm latest
^4.0.0 npm mui-v4
^1.0.0, ^3.0.0 npm mui-v3
0.x npm * legacy

* mdi-material-ui v4 (for Material-UI v0) is not updated anymore

Usage

Every icon is exported with its original name in PascalCase. So coffee becomes Coffee, cloud-print-outline is exported as CloudPrintOutline and so on.

The Material Design Light icons are included in the /light subdirectory.

With tree-shaking

If your environment supports tree-shaking and you are sure that it works fine in your setup, you can simply import the icons as follows:

import { Coffee, Food } from 'mdi-material-ui'
import { Camera, Settings } from 'mdi-material-ui/light'

<Coffee />
<Food />
<Camera />
<Settings />

Without tree-shaking

If your environment doesn't support tree-shaking, you should only import the icons that you actually need in order to ensure that you don't end up bundling all icons.

import Coffee from 'mdi-material-ui/Coffee'
import Food from 'mdi-material-ui/Food'
import Camera from 'mdi-material-ui/light/Camera'
import Settings from 'mdi-material-ui/light/Settings'

<Coffee />
<Food />
<Camera />
<Settings />

License

The scripts included in this repository are licensed under the MIT license. The icons are licensed under the MIT license (see Material Design Icons and the NOTICE file).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap