Add instruction for setting iconfont size and color, ref #2125

This commit is contained in:
afc163 2017-04-06 20:52:32 +08:00
parent b643aa752f
commit 11852b815a
2 changed files with 12 additions and 0 deletions

View File

@ -64,6 +64,12 @@ ReactDOM.render(<IconSet className="icons" catigory="logo" />, mountNode);
## API
You can set `style` and `className` for size and color of icons because they are still words in essence.
```jsx
<Icon type="question" style={{ fontSize: 16, color: '#08c' }} />
```
| Property | Description | Type | Default |
|----------|------------------|------- |---------|
| type | Type of ant design icons | string | - |

View File

@ -65,6 +65,12 @@ ReactDOM.render(<IconSet className="icons" catigory="logo" />, mountNode);
## API
由于图标字体本质上还是文字,可以使用 `style``className` 设置图标的大小和颜色。
```jsx
<Icon type="question" style={{ fontSize: 16, color: '#08c' }} />
```
| 参数 | 说明 | 类型 | 默认值 |
|----------|------------------|----------|--------|
| type | 图标类型 | string | - |