3.8.0 • Published 4 years ago

salt-icon v3.8.0

Weekly downloads
33
License
MIT
Repository
-
Last release
4 years ago

salt-icon

预览

image

Install

tnpm install salt-icon --save

使用

  • 方式一(推荐):
import Eye from 'salt-icon/lib/Eye';

render() {
    return <Eye />
}
  • 方式二:
import Icon from 'salt-icon';

render() {
    return <Icon name='icon-name'/>
}
  • 方法三:(不推荐)
import Icon from 'salt-icon/dist/Symbol';

render() {
    return <Icon name='icon-name'/>
}

使用 symbol & use 的方式使用 Icon,主要是为了兼容老的方案

Props

className

描述:自定义的扩展样式名称

类型:String

默认:''

name

描述:icon所对应的svg文件的命名。

注意:写名称即可,不是写路径。

类型:String

默认:''

fill

描述:icon 颜色

类型:String

默认:'#000'

width

描述:icon 宽度

类型:Number/String

默认:'32px'

height

描述:icon 高度

类型:Number/String

默认:'32px'

onClick

描述:事件

类型:Function

默认:() => {}

Links

3.8.0

4 years ago

3.7.8

5 years ago

3.7.7

5 years ago

3.7.6

5 years ago

3.7.5

5 years ago

3.7.4

5 years ago

3.7.3

5 years ago

3.7.2

6 years ago

3.7.1

6 years ago

3.7.0

6 years ago

3.6.1

6 years ago

3.6.0

6 years ago

3.5.0

6 years ago

3.4.0

6 years ago

3.3.2

7 years ago

3.3.1

7 years ago

3.3.0

7 years ago

3.2.3

7 years ago

3.2.2

7 years ago

3.1.4

7 years ago