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

37 lines
551 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
2020-11-08 15:04:02 +08:00
`block` 属性将使按钮适合其父宽度。
## en-US
`block` property will make the button fit to its parent width.
```tsx
import { Button } from 'antd';
2022-05-23 14:37:16 +08:00
import React from 'react';
const App: React.FC = () => (
2020-06-11 15:24:24 +08:00
<>
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>
</>
2018-11-28 15:00:03 +08:00
);
export default App;
2019-05-07 14:57:32 +08:00
```