mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
![renovate[bot]](/assets/img/avatar_default.png)
* chore(deps): update dependency nwsapi to v2.2.16 * refactor: selected item radius style code * fix * Apply suggestions from code review Signed-off-by: afc163 <afc163@gmail.com> * fix * fix * fix * fix * fix * fix * fix * fix role in select --------- Signed-off-by: afc163 <afc163@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: afc163 <afc163@gmail.com>
29 lines
759 B
TypeScript
29 lines
759 B
TypeScript
import React from 'react';
|
|
import { Select, Space, Switch } from 'antd';
|
|
|
|
const { _InternalPanelDoNotUseOrYouWillBeFired: InternalSelect } = Select;
|
|
|
|
const App: React.FC = () => {
|
|
const [open, setOpen] = React.useState(true);
|
|
|
|
return (
|
|
<Space direction="vertical" style={{ display: 'flex' }}>
|
|
<Switch checked={open} onChange={() => setOpen(!open)} />
|
|
<InternalSelect
|
|
defaultValue="lucy"
|
|
style={{ width: 120 }}
|
|
open={open}
|
|
options={[
|
|
{ label: 'Jack', value: 'jack' },
|
|
{ label: 'Lucy', value: 'lucy' },
|
|
{ label: 'Disabled', value: 'disabled' },
|
|
{ label: 'Bamboo', value: 'bamboo' },
|
|
]}
|
|
virtual={false}
|
|
/>
|
|
</Space>
|
|
);
|
|
};
|
|
|
|
export default App;
|