ant-design/components/icon/demo/two-tone.md
afc163 80e7cc0afd
fix: <Icon component={HomeOutlined} /> align issue (#33709)
* fix: <Icon component={HomeOutlined} /> align issue

close #33703

* update snapshot
2022-01-13 20:32:09 +08:00

29 lines
549 B
Markdown

---
order: 1
title:
zh-CN: 多色图标
en-US: Two-tone icon and colorful icon
---
## zh-CN
双色图标可以通过 `twoToneColor` 属性设置主题色。
## en-US
You can set `twoToneColor` prop to specific primary color for two-tone icons.
```jsx
import { Space } from 'antd';
import { SmileTwoTone, HeartTwoTone, CheckCircleTwoTone } from '@ant-design/icons';
ReactDOM.render(
<Space>
<SmileTwoTone />
<HeartTwoTone twoToneColor="#eb2f96" />
<CheckCircleTwoTone twoToneColor="#52c41a" />
</Space>,
mountNode,
);
```