mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-22 22:48:29 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
88 lines
2.5 KiB
TypeScript
88 lines
2.5 KiB
TypeScript
import React from 'react';
|
|
import { CopyOutlined, SearchOutlined } from '@ant-design/icons';
|
|
import { Button, Cascader, Input, InputNumber, Select, Space, TimePicker } from 'antd';
|
|
|
|
const { Option } = Select;
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<Space.Compact block>
|
|
<Space.Compact>
|
|
<Space.Compact>
|
|
<Input style={{ width: 90 }} placeholder="Typing..." />
|
|
<Button icon={<SearchOutlined />} />
|
|
</Space.Compact>
|
|
<Space.Compact>
|
|
<InputNumber defaultValue={12} />
|
|
<Select defaultValue="Option1">
|
|
<Option value="Option1">Opt1</Option>
|
|
<Option value="Option2">Opt2</Option>
|
|
</Select>
|
|
</Space.Compact>
|
|
</Space.Compact>
|
|
<Button type="primary">Separator</Button>
|
|
<Space.Compact>
|
|
<Space.Compact>
|
|
<Input.Search style={{ width: 110 }} placeholder="Search" />
|
|
<Button type="primary">Submit</Button>
|
|
</Space.Compact>
|
|
<Space.Compact>
|
|
<Input defaultValue="mysite" />
|
|
<Button icon={<CopyOutlined />} />
|
|
</Space.Compact>
|
|
</Space.Compact>
|
|
</Space.Compact>
|
|
<>
|
|
<br />
|
|
<Space.Compact block>
|
|
<Space.Compact>
|
|
<TimePicker />
|
|
<Button type="primary">Submit</Button>
|
|
</Space.Compact>
|
|
<Space.Compact>
|
|
<Cascader
|
|
options={[
|
|
{
|
|
value: 'zhejiang',
|
|
label: 'Zhejiang',
|
|
children: [
|
|
{
|
|
value: 'hangzhou',
|
|
label: 'Hangzhou',
|
|
children: [
|
|
{
|
|
value: 'xihu',
|
|
label: 'West Lake',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
{
|
|
value: 'jiangsu',
|
|
label: 'Jiangsu',
|
|
children: [
|
|
{
|
|
value: 'nanjing',
|
|
label: 'Nanjing',
|
|
children: [
|
|
{
|
|
value: 'zhonghuamen',
|
|
label: 'Zhong Hua Men',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
]}
|
|
placeholder="Select Address"
|
|
/>
|
|
<Button type="primary">Submit</Button>
|
|
</Space.Compact>
|
|
</Space.Compact>
|
|
</>
|
|
</>
|
|
);
|
|
|
|
export default App;
|