ant-design/components/icon/demo/two-tone.md

28 lines
590 B
Markdown
Raw Normal View History

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-08-31 11:14:51 +08:00
<Icon type="dollar" theme="twoTone" />
<Icon type="euro" theme="twoTone" />
2018-09-01 19:44:21 +08:00
<Icon type="check-circle" theme="twoTone" twoToneColor="#eb2f96" />
2018-08-30 22:53:24 +08:00
</div>,
mountNode
);
````