xa-icon
v1.0.9
Published
- 基本用法 ``` import Icon from 'xa-icon';
Downloads
10
Readme
xa-icon
- 基本用法
import Icon from 'xa-icon';
ReactDOM.render(
<div>
<Icon type="home" />
<Icon type="setting"/>
<Icon type="sync" spin />
<Icon type="loading"/>
</div>
, mountNode
);
- 引用iconfont
import Input from 'xa-input';
const IconFont = Icon.createFromIconfontCN({
scriptUrl: "//at.alicdn.com/t/font_815669_cnvztkbou2w.css"
});
ReactDOM.render(
<div>
<IconFont type="arrow-down" />
</div>
, mountNode
);
API
| 属性名 | 类型 | 默认值 | 说明 --------|-------|-------|----------- | type | String | - | 图标类型。遵循图标的命名规范 | spin |boolean|false|是否有旋转动画