2018-07-06 23:48:37 +08:00
|
|
|
|
---
|
|
|
|
|
order: 4
|
|
|
|
|
title:
|
|
|
|
|
zh-CN: 自定义 Icon 图标
|
|
|
|
|
en-US: Customize icon
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
2019-08-13 14:07:17 +08:00
|
|
|
|
自定义提示 `icon`。
|
2018-07-06 23:48:37 +08:00
|
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
|
|
Set `icon` props to customize the icon.
|
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
|
```tsx
|
|
|
|
|
import React from 'react';
|
2019-08-13 14:07:17 +08:00
|
|
|
|
import { Popconfirm } from 'antd';
|
2019-11-28 12:34:33 +08:00
|
|
|
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
2018-07-06 23:48:37 +08:00
|
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
|
const App: React.FC = () => (
|
2019-11-28 12:34:33 +08:00
|
|
|
|
<Popconfirm title="Are you sure?" icon={<QuestionCircleOutlined style={{ color: 'red' }} />}>
|
2018-07-06 23:48:37 +08:00
|
|
|
|
<a href="#">Delete</a>
|
2022-04-03 23:27:45 +08:00
|
|
|
|
</Popconfirm>
|
2018-11-28 15:00:03 +08:00
|
|
|
|
);
|
2022-05-19 09:46:26 +08:00
|
|
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
|
```
|