Skip to content

Instantly share code, notes, and snippets.

@JenniferFuBook
Last active February 12, 2023 23:47
Show Gist options
  • Save JenniferFuBook/dd2d65f5701ab06c9aeb123289a41b0d to your computer and use it in GitHub Desktop.
Save JenniferFuBook/dd2d65f5701ab06c9aeb123289a41b0d to your computer and use it in GitHub Desktop.
import { Button, ConfigProvider, Space, Select, theme } from 'antd';
const options = [
{ value: 'jack', label: 'Jack' },
{ value: 'lucy', label: 'Lucy' },
{ value: 'Yiminghe', label: 'yiminghe' },
{ value: 'disabled', label: 'Disabled', disabled: true },
];
function App() {
return (
<div style={{ background: 'black', height: 'calc(100vh - 40px)', padding: '20px' }}>
<ConfigProvider theme={{ algorithm: theme.darkAlgorithm }}>
<Space direction="vertical">
<Space wrap>
<Button type="primary">Primary Button</Button>
<Button>Default Button</Button>
<Button type="dashed">Dashed Button</Button>
<Button type="text">Text Button</Button>
<Button type="link">Link Button</Button>
</Space>
<Space wrap>
<Select
defaultValue="lucy"
style={{ width: 120 }}
options={options}
/>
<Select
defaultValue="lucy"
style={{ width: 120 }}
disabled
options={options}
/>
<Select
defaultValue="lucy"
style={{ width: 120 }}
loading
options={options}
/>
<Select
defaultValue="lucy"
style={{ width: 120 }}
allowClear
options={options}
/>
</Space>
</Space>
</ConfigProvider>
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment