ant-design/components/alert/demo/close-text.md

24 lines
410 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 5
title:
zh-CN: 自定义关闭
en-US: Customized Close Text
2016-03-31 09:40:55 +08:00
---
2015-07-27 20:53:08 +08:00
## zh-CN
2015-07-29 17:22:36 +08:00
可以自定义关闭,自定义的文字会替换原先的关闭 `Icon`
2015-07-27 20:53:08 +08:00
## en-US
Replace the default icon with customized text.
2020-01-21 16:21:37 +08:00
```tsx
import { Alert } from 'antd';
2022-05-21 22:14:15 +08:00
import React from 'react';
2015-07-27 20:53:08 +08:00
const App: React.FC = () => <Alert message="Info Text" type="info" closeText="Close Now" />;
export default App;
2019-05-07 14:57:32 +08:00
```