2022-11-17 13:20:58 +08:00
|
|
|
import { SearchOutlined } from '@ant-design/icons';
|
2023-07-28 16:17:43 +08:00
|
|
|
import React, { useState } from 'react';
|
2023-05-22 13:37:41 +08:00
|
|
|
import { Button, ConfigProvider, Divider, Radio, Space, Tooltip } from 'antd';
|
2022-11-17 13:20:58 +08:00
|
|
|
import type { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
|
|
|
|
|
|
const App: React.FC = () => {
|
|
|
|
const [size, setSize] = useState<SizeType>('large');
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Radio.Group value={size} onChange={(e) => setSize(e.target.value)}>
|
|
|
|
<Radio.Button value="large">Large</Radio.Button>
|
|
|
|
<Radio.Button value="default">Default</Radio.Button>
|
|
|
|
<Radio.Button value="small">Small</Radio.Button>
|
|
|
|
</Radio.Group>
|
|
|
|
<Divider orientation="left" plain>
|
|
|
|
Preview
|
|
|
|
</Divider>
|
|
|
|
<ConfigProvider componentSize={size}>
|
|
|
|
<Space direction="vertical">
|
|
|
|
<Space wrap>
|
|
|
|
<Tooltip title="search">
|
|
|
|
<Button type="primary" shape="circle" icon={<SearchOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Button type="primary" shape="circle">
|
|
|
|
A
|
|
|
|
</Button>
|
|
|
|
<Button type="primary" icon={<SearchOutlined />}>
|
|
|
|
Search
|
|
|
|
</Button>
|
|
|
|
<Tooltip title="search">
|
|
|
|
<Button shape="circle" icon={<SearchOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Button icon={<SearchOutlined />}>Search</Button>
|
|
|
|
</Space>
|
|
|
|
<Space wrap>
|
|
|
|
<Tooltip title="search">
|
|
|
|
<Button shape="circle" icon={<SearchOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Button icon={<SearchOutlined />}>Search</Button>
|
|
|
|
<Tooltip title="search">
|
|
|
|
<Button type="dashed" shape="circle" icon={<SearchOutlined />} />
|
|
|
|
</Tooltip>
|
|
|
|
<Button type="dashed" icon={<SearchOutlined />}>
|
|
|
|
Search
|
|
|
|
</Button>
|
|
|
|
<Button icon={<SearchOutlined />} href="https://www.google.com" />
|
2023-05-22 13:37:41 +08:00
|
|
|
<Button>
|
|
|
|
<SearchOutlined />
|
|
|
|
Search
|
|
|
|
</Button>
|
2022-11-17 13:20:58 +08:00
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</ConfigProvider>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|