ant-design/components/popover/demo/basic.md

32 lines
493 B
Markdown
Raw Normal View History

2016-03-31 09:40:55 +08:00
---
order: 0
title:
zh-CN: 基本
en-US: Basic
2016-03-31 09:40:55 +08:00
---
2015-06-17 16:58:13 +08:00
## zh-CN
2016-03-24 11:25:23 +08:00
最简单的用法,浮层的大小由内容区域决定。
2015-06-17 16:58:13 +08:00
## en-US
The most basic example. The size of the floating layer depends on the contents region.
2015-06-17 16:58:13 +08:00
````jsx
import { Popover, Button } from 'antd';
const content = (
<div>
<p>内容</p>
<p>内容</p>
</div>
);
2015-06-17 16:58:13 +08:00
2015-10-20 16:47:55 +08:00
ReactDOM.render(
<Popover content={content} title="标题">
<Button type="primary">弹出卡片</Button>
2015-06-17 16:58:13 +08:00
</Popover>
, mountNode);
2015-06-17 16:58:13 +08:00
````