mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
parent
3fcf9de2b6
commit
99f0db6ea6
@ -1778,7 +1778,6 @@ exports[`renders components/button/demo/icon.tsx extend context correctly 1`] =
|
||||
|
||||
exports[`renders components/button/demo/legacy-group.tsx extend context correctly 1`] = `
|
||||
Array [
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group ant-btn-group-sm"
|
||||
>
|
||||
@ -1891,10 +1890,8 @@ Array [
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
<br />,
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group"
|
||||
>
|
||||
@ -2007,10 +2004,8 @@ Array [
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
<br />,
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group ant-btn-group-lg"
|
||||
>
|
||||
@ -2123,7 +2118,6 @@ Array [
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
]
|
||||
`;
|
||||
|
@ -1621,7 +1621,6 @@ exports[`renders components/button/demo/icon.tsx correctly 1`] = `
|
||||
|
||||
exports[`renders components/button/demo/legacy-group.tsx correctly 1`] = `
|
||||
Array [
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group ant-btn-group-sm"
|
||||
>
|
||||
@ -1696,10 +1695,8 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>,
|
||||
<br />,
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group"
|
||||
>
|
||||
@ -1774,10 +1771,8 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>,
|
||||
<br />,
|
||||
<div>
|
||||
<div
|
||||
class="ant-btn-group ant-btn-group-lg"
|
||||
>
|
||||
@ -1852,7 +1847,6 @@ Array [
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>,
|
||||
]
|
||||
`;
|
||||
|
@ -1,10 +1,9 @@
|
||||
import React from 'react';
|
||||
import { DownloadOutlined } from '@ant-design/icons';
|
||||
import { Button, Tooltip } from 'antd';
|
||||
import type { ButtonGroupProps } from 'antd/es/button';
|
||||
import React from 'react';
|
||||
|
||||
const getGroup = (props?: ButtonGroupProps) => (
|
||||
<div>
|
||||
const CustomGroup: React.FC<ButtonGroupProps> = (props) => (
|
||||
<Button.Group {...props}>
|
||||
<Button type="primary">Button 1</Button>
|
||||
<Button type="primary">Button 2</Button>
|
||||
@ -15,16 +14,15 @@ const getGroup = (props?: ButtonGroupProps) => (
|
||||
<Button type="primary" icon={<DownloadOutlined />} />
|
||||
</Tooltip>
|
||||
</Button.Group>
|
||||
</div>
|
||||
);
|
||||
|
||||
const App: React.FC = () => (
|
||||
<>
|
||||
{getGroup({ size: 'small' })}
|
||||
<CustomGroup size="small" />
|
||||
<br />
|
||||
{getGroup()}
|
||||
<CustomGroup />
|
||||
<br />
|
||||
{getGroup({ size: 'large' })}
|
||||
<CustomGroup size="large" />
|
||||
</>
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user