mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
31 lines
596 B
Markdown
31 lines
596 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.
|
|
|
|
```tsx
|
|
import { CheckCircleTwoTone, HeartTwoTone, SmileTwoTone } from '@ant-design/icons';
|
|
import { Space } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => (
|
|
<Space>
|
|
<SmileTwoTone />
|
|
<HeartTwoTone twoToneColor="#eb2f96" />
|
|
<CheckCircleTwoTone twoToneColor="#52c41a" />
|
|
</Space>
|
|
);
|
|
|
|
export default App;
|
|
```
|