Browse Source

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

pull/5655/head
afc163 8 years ago
parent
commit
11852b815a
  1. 6
      components/icon/index.en-US.md
  2. 6
      components/icon/index.zh-CN.md

6
components/icon/index.en-US.md

@ -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 | - |

6
components/icon/index.zh-CN.md

@ -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 | - |

Loading…
Cancel
Save