2016-03-31 09:40:55 +08:00
|
|
|
---
|
|
|
|
order: 0
|
2016-07-04 10:49:26 +08:00
|
|
|
title:
|
|
|
|
zh-CN: 基本
|
|
|
|
en-US: Basic
|
2016-03-31 09:40:55 +08:00
|
|
|
---
|
2015-07-27 20:53:08 +08:00
|
|
|
|
2016-07-04 10:49:26 +08:00
|
|
|
## zh-CN
|
|
|
|
|
2015-07-29 15:22:47 +08:00
|
|
|
最简单的用法,适用于简短的警告提示。
|
2015-07-27 20:53:08 +08:00
|
|
|
|
2016-07-04 10:49:26 +08:00
|
|
|
## en-US
|
|
|
|
|
|
|
|
The simplest usage for short messages.
|
|
|
|
|
2020-01-21 16:21:37 +08:00
|
|
|
```tsx
|
2015-10-28 20:55:49 +08:00
|
|
|
import { Alert } from 'antd';
|
2022-05-21 22:14:15 +08:00
|
|
|
import React from 'react';
|
2015-07-27 20:53:08 +08:00
|
|
|
|
2022-05-19 09:46:26 +08:00
|
|
|
const App: React.FC = () => <Alert message="Success Text" type="success" />;
|
|
|
|
|
|
|
|
export default App;
|
2019-05-07 14:57:32 +08:00
|
|
|
```
|
2017-05-23 17:51:10 +08:00
|
|
|
|
|
|
|
<style>
|
2019-12-25 21:54:21 +08:00
|
|
|
.code-box-demo .ant-alert {
|
2017-05-23 17:51:10 +08:00
|
|
|
margin-bottom: 16px;
|
|
|
|
}
|
|
|
|
</style>
|