ant-design/components/alert/demo/banner.md

28 lines
462 B
Markdown
Raw Normal View History

2016-08-03 14:54:10 +08:00
---
order: 6
2017-03-22 17:32:52 +08:00
iframe: true
2016-08-03 14:54:10 +08:00
title:
zh-CN: 顶部公告
en-US: Banner
---
## zh-CN
2017-03-22 17:32:52 +08:00
页面顶部通告形式,默认有图标且`type` 为 'warning'。
2016-08-03 14:54:10 +08:00
## en-US
2017-03-22 17:32:52 +08:00
Display Alert as a banner at top of page.
2016-08-03 14:54:10 +08:00
2017-02-13 10:55:53 +08:00
````jsx
2016-08-03 14:54:10 +08:00
import { Alert } from 'antd';
ReactDOM.render(
<div>
<Alert message="Warning text" banner />
<br />
<Alert message="Very long warning text warning text text text text text text text" banner closable />
</div>
, mountNode);
````