mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-29 18:50:00 +08:00
demo(space): replace 'overlay' in Dropdown (#48867)
* demo(space): replace 'overlay' in Dropdown * test: update snap
This commit is contained in:
parent
eb218e80c6
commit
7af1cc616b
@ -10005,11 +10005,7 @@ exports[`renders components/space/demo/compact-buttons.tsx extend context correc
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`renders components/space/demo/compact-buttons.tsx extend context correctly 2`] = `
|
||||
[
|
||||
"Warning: [antd: Dropdown] \`overlay\` is deprecated. Please use \`menu\` instead.",
|
||||
]
|
||||
`;
|
||||
exports[`renders components/space/demo/compact-buttons.tsx extend context correctly 2`] = `[]`;
|
||||
|
||||
exports[`renders components/space/demo/compact-debug.tsx extend context correctly 1`] = `
|
||||
<div
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
StarOutlined,
|
||||
WarningOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { Button, Dropdown, Menu, Space, Tooltip } from 'antd';
|
||||
import { Button, Dropdown, Space, Tooltip } from 'antd';
|
||||
|
||||
const App: React.FC = () => (
|
||||
<div>
|
||||
@ -36,27 +36,25 @@ const App: React.FC = () => (
|
||||
</Tooltip>
|
||||
<Dropdown
|
||||
placement="bottomRight"
|
||||
overlay={
|
||||
<Menu
|
||||
items={[
|
||||
{
|
||||
key: '1',
|
||||
label: 'Report',
|
||||
icon: <WarningOutlined />,
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: 'Mail',
|
||||
icon: <MailOutlined />,
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: 'Mobile',
|
||||
icon: <MobileOutlined />,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
}
|
||||
menu={{
|
||||
items: [
|
||||
{
|
||||
key: '1',
|
||||
label: 'Report',
|
||||
icon: <WarningOutlined />,
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: 'Mail',
|
||||
icon: <MailOutlined />,
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: 'Mobile',
|
||||
icon: <MobileOutlined />,
|
||||
},
|
||||
],
|
||||
}}
|
||||
trigger={['click']}
|
||||
>
|
||||
<Button icon={<EllipsisOutlined />} />
|
||||
@ -89,24 +87,22 @@ const App: React.FC = () => (
|
||||
<Button type="primary">Button 4</Button>
|
||||
<Dropdown
|
||||
placement="bottomRight"
|
||||
overlay={
|
||||
<Menu
|
||||
items={[
|
||||
{
|
||||
key: '1',
|
||||
label: '1st item',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: '2nd item',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: '3rd item',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
}
|
||||
menu={{
|
||||
items: [
|
||||
{
|
||||
key: '1',
|
||||
label: '1st item',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: '2nd item',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: '3rd item',
|
||||
},
|
||||
],
|
||||
}}
|
||||
trigger={['click']}
|
||||
>
|
||||
<Button type="primary" icon={<EllipsisOutlined />} />
|
||||
|
Loading…
Reference in New Issue
Block a user