mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
24 lines
410 B
Markdown
24 lines
410 B
Markdown
---
|
|
order: 5
|
|
title:
|
|
zh-CN: 自定义关闭
|
|
en-US: Customized Close Text
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
可以自定义关闭,自定义的文字会替换原先的关闭 `Icon`。
|
|
|
|
## en-US
|
|
|
|
Replace the default icon with customized text.
|
|
|
|
```tsx
|
|
import { Alert } from 'antd';
|
|
import React from 'react';
|
|
|
|
const App: React.FC = () => <Alert message="Info Text" type="info" closeText="Close Now" />;
|
|
|
|
export default App;
|
|
```
|