2022-11-09 12:28:04 +08:00
|
|
|
import React from 'react';
|
|
|
|
import {
|
2024-04-08 14:04:08 +08:00
|
|
|
CommentOutlined,
|
2022-11-09 12:28:04 +08:00
|
|
|
DownloadOutlined,
|
|
|
|
EllipsisOutlined,
|
|
|
|
HeartOutlined,
|
|
|
|
LikeOutlined,
|
|
|
|
MailOutlined,
|
|
|
|
MobileOutlined,
|
2024-04-08 14:04:08 +08:00
|
|
|
ShareAltOutlined,
|
|
|
|
StarOutlined,
|
|
|
|
WarningOutlined,
|
2022-11-09 12:28:04 +08:00
|
|
|
} from '@ant-design/icons';
|
2024-05-10 19:19:35 +08:00
|
|
|
import { Button, Dropdown, Space, Tooltip } from 'antd';
|
2022-11-09 12:28:04 +08:00
|
|
|
|
|
|
|
const App: React.FC = () => (
|
|
|
|
<div>
|
|
|
|
<Space.Compact block>
|
|
|
|
<Tooltip title="Like">
|
|
|
|
<Button icon={<LikeOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Comment">
|
|
|
|
<Button icon={<CommentOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Star">
|
|
|
|
<Button icon={<StarOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Heart">
|
|
|
|
<Button icon={<HeartOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Share">
|
|
|
|
<Button icon={<ShareAltOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Download">
|
|
|
|
<Button icon={<DownloadOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Dropdown
|
|
|
|
placement="bottomRight"
|
2024-05-10 19:19:35 +08:00
|
|
|
menu={{
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
key: '1',
|
|
|
|
label: 'Report',
|
|
|
|
icon: <WarningOutlined />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: '2',
|
|
|
|
label: 'Mail',
|
|
|
|
icon: <MailOutlined />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: '3',
|
|
|
|
label: 'Mobile',
|
|
|
|
icon: <MobileOutlined />,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}}
|
2022-11-09 12:28:04 +08:00
|
|
|
trigger={['click']}
|
|
|
|
>
|
|
|
|
<Button icon={<EllipsisOutlined />} />
|
|
|
|
</Dropdown>
|
|
|
|
</Space.Compact>
|
|
|
|
<br />
|
|
|
|
<Space.Compact block>
|
|
|
|
<Button type="primary">Button 1</Button>
|
|
|
|
<Button type="primary">Button 2</Button>
|
|
|
|
<Button type="primary">Button 3</Button>
|
|
|
|
<Button type="primary">Button 4</Button>
|
|
|
|
<Tooltip title="Tooltip">
|
|
|
|
<Button type="primary" icon={<DownloadOutlined />} disabled />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Tooltip">
|
|
|
|
<Button type="primary" icon={<DownloadOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
</Space.Compact>
|
|
|
|
<br />
|
|
|
|
<Space.Compact block>
|
|
|
|
<Button>Button 1</Button>
|
|
|
|
<Button>Button 2</Button>
|
|
|
|
<Button>Button 3</Button>
|
|
|
|
<Tooltip title="Tooltip">
|
|
|
|
<Button icon={<DownloadOutlined />} disabled />
|
|
|
|
</Tooltip>
|
|
|
|
<Tooltip title="Tooltip">
|
|
|
|
<Button icon={<DownloadOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Button type="primary">Button 4</Button>
|
|
|
|
<Dropdown
|
|
|
|
placement="bottomRight"
|
2024-05-10 19:19:35 +08:00
|
|
|
menu={{
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
key: '1',
|
|
|
|
label: '1st item',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: '2',
|
|
|
|
label: '2nd item',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
key: '3',
|
|
|
|
label: '3rd item',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}}
|
2022-11-09 12:28:04 +08:00
|
|
|
trigger={['click']}
|
|
|
|
>
|
|
|
|
<Button type="primary" icon={<EllipsisOutlined />} />
|
|
|
|
</Dropdown>
|
|
|
|
</Space.Compact>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default App;
|