mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-23 23:18:36 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
28 lines
541 B
Markdown
28 lines
541 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';
|
|
|
|
export default () => (
|
|
<Space>
|
|
<SmileTwoTone />
|
|
<HeartTwoTone twoToneColor="#eb2f96" />
|
|
<CheckCircleTwoTone twoToneColor="#52c41a" />
|
|
</Space>
|
|
);
|
|
```
|