ant-design/components/button/demo/block.md

35 lines
509 B
Markdown
Raw Normal View History

---
2020-01-03 15:22:16 +08:00
order: 10
title:
2020-01-03 15:22:16 +08:00
zh-CN: Block 按钮
en-US: Block Button
---
## zh-CN
`block`属性将使按钮适合其父宽度。
## en-US
`block` property will make the button fit to its parent width.
2019-05-07 14:57:32 +08:00
```jsx
import { Button } from 'antd';
ReactDOM.render(
<div>
2019-05-07 14:57:32 +08:00
<Button type="primary" block>
Primary
</Button>
<Button block>Default</Button>
2019-05-07 14:57:32 +08:00
<Button type="dashed" block>
Dashed
</Button>
2019-11-22 13:59:20 +08:00
<Button type="link" block>
Link
</Button>
</div>,
2019-05-07 14:57:32 +08:00
mountNode,
2018-11-28 15:00:03 +08:00
);
2019-05-07 14:57:32 +08:00
```