mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Add instruction for setting iconfont size and color, ref #2125
This commit is contained in:
parent
b643aa752f
commit
11852b815a
@ -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 | - |
|
||||
|
@ -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…
Reference in New Issue
Block a user