nuke-icon

2.3.12 • Public • Published

Icon

  • category: UI
  • chinese: 图标
  • type: UI组件

设计思路

Icon 组件 是对 Image 组件的一个封装,预置了4个尺寸的图片,方便我们在开发中使用方形的图片。

考虑到使用便捷性,还额外加入了 Iconfont 图标的支持, 查看 demo 可以找到所有内置 icon。

API

参数 说明 类型 默认值
type 新增 type 字段,标识是 iconfont 还是图片,可选 image iconfont string 'image'
size type = image 时有效,定义了 icon 的尺寸:'xs', 'small', 'medium', 'large' string 'medium'
onPress 当传入 name 时失效,Press事件 Function
src 图片链接地址或 iconfont url string
name iconfont name 值 string

Dependents (17)

Package Sidebar

Install

npm i nuke-icon

Weekly Downloads

18

Version

2.3.12

License

Apache-2.0

Unpacked Size

42.3 kB

Total Files

22

Last publish

Collaborators

  • bindoon
  • doub
  • fnatic
  • leanhunter
  • no-repeat