mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-16 18:09:22 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
54 lines
933 B
Markdown
54 lines
933 B
Markdown
---
|
|
order: 99
|
|
title:
|
|
zh-CN: 废弃的 Block 组
|
|
en-US: Deprecated Button Group
|
|
debug: true
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
Debug usage
|
|
|
|
## en-US
|
|
|
|
Debug usage
|
|
|
|
```jsx
|
|
import { Button, Tooltip } from 'antd';
|
|
import { DownloadOutlined } from '@ant-design/icons';
|
|
|
|
function getGroup(props) {
|
|
return (
|
|
<div>
|
|
<Button.Group {...props}>
|
|
<Button type="primary">Button 1</Button>
|
|
<Button type="primary">Button 2</Button>
|
|
<Tooltip title="Tooltip">
|
|
<Button type="primary" icon={<DownloadOutlined />} disabled />
|
|
</Tooltip>
|
|
<Tooltip title="Tooltip">
|
|
<Button type="primary" icon={<DownloadOutlined />} />
|
|
</Tooltip>
|
|
</Button.Group>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default () => (
|
|
<>
|
|
{getGroup({ size: 'small' })}
|
|
<br />
|
|
{getGroup()}
|
|
<br />
|
|
{getGroup({ size: 'large' })}
|
|
</>
|
|
);
|
|
```
|
|
|
|
```css
|
|
#components-button-demo-legacy-group .ant-btn {
|
|
margin: 0;
|
|
}
|
|
```
|