mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
99f0db6ea6
* docs: update demo * demo: delete div
30 lines
771 B
TypeScript
30 lines
771 B
TypeScript
import { DownloadOutlined } from '@ant-design/icons';
|
|
import { Button, Tooltip } from 'antd';
|
|
import type { ButtonGroupProps } from 'antd/es/button';
|
|
import React from 'react';
|
|
|
|
const CustomGroup: React.FC<ButtonGroupProps> = (props) => (
|
|
<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>
|
|
);
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<CustomGroup size="small" />
|
|
<br />
|
|
<CustomGroup />
|
|
<br />
|
|
<CustomGroup size="large" />
|
|
</>
|
|
);
|
|
|
|
export default App;
|