ant-design/components/select/demo/render-panel.tsx
renovate[bot] c27582ec13
chore(deps): update dependency nwsapi to v2.2.16 (#51844)
* 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>
2025-01-09 13:48:54 +08:00

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;