mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-23 23:18:36 +08:00
5f395fbed3
* feat: Select filled style * chore: update snapshot * feat: Cascader and TreeSelect support variant * feat: multiple style * fix: import * chore: fix lint * chore: update auto-complete docs * fix: clearIcon bg * chore: code clean
80 lines
2.0 KiB
TypeScript
80 lines
2.0 KiB
TypeScript
import React from 'react';
|
|
import { Flex, Select } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<Flex gap={12} vertical>
|
|
<Flex gap={8}>
|
|
<Select
|
|
placeholder="Outlined"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
<Select
|
|
mode="multiple"
|
|
defaultValue={['lucy']}
|
|
placeholder="Outlined"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
</Flex>
|
|
<Flex gap={8}>
|
|
<Select
|
|
placeholder="Filled"
|
|
variant="filled"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
<Select
|
|
mode="multiple"
|
|
defaultValue={['lucy']}
|
|
placeholder="Filled"
|
|
variant="filled"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
</Flex>
|
|
<Flex gap={8}>
|
|
<Select
|
|
placeholder="Borderless"
|
|
variant="borderless"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
<Select
|
|
mode="multiple"
|
|
defaultValue={['lucy']}
|
|
placeholder="Borderless"
|
|
variant="borderless"
|
|
style={{ flex: 1 }}
|
|
options={[
|
|
{ value: 'jack', label: 'Jack' },
|
|
{ value: 'lucy', label: 'Lucy' },
|
|
{ value: 'Yiminghe', label: 'yiminghe' },
|
|
]}
|
|
/>
|
|
</Flex>
|
|
</Flex>
|
|
);
|
|
|
|
export default App;
|