2018-08-30 22:53:24 +08:00
|
|
|
---
|
|
|
|
order: 1
|
|
|
|
title:
|
|
|
|
zh-CN: 多色图标
|
|
|
|
en-US: Two-tone icon and colorful icon
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
2018-09-01 17:44:15 +08:00
|
|
|
可以通过设置 `theme` 属性为 `twoTone` 来渲染双色图标,并且可以设置主题色。
|
2018-08-30 22:53:24 +08:00
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
2018-09-01 17:44:15 +08:00
|
|
|
Specific them property `theme` to `twoTone` to render two-tone icons. You can also set the primary color.
|
2018-08-30 22:53:24 +08:00
|
|
|
|
|
|
|
````jsx
|
|
|
|
import { Icon } from 'antd';
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div className="icons-list">
|
2018-09-02 23:37:16 +08:00
|
|
|
<Icon type="smile" theme="twoTone" />
|
2018-09-03 00:30:41 +08:00
|
|
|
<Icon type="heart" theme="twoTone" twoToneColor="#eb2f96" />
|
|
|
|
<Icon type="check-circle" theme="twoTone" twoToneColor="#52c41a" />
|
2018-08-30 22:53:24 +08:00
|
|
|
</div>,
|
|
|
|
mountNode
|
|
|
|
);
|
|
|
|
````
|