mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2025-07-28 04:33:42 +08:00
[ui][select] make uncontrolled
This commit is contained in:
@ -176,3 +176,28 @@ export function Disabled() {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function Uncontrolled() {
|
||||
return (
|
||||
<div className="space-x-4">
|
||||
<Select
|
||||
defaultValue="apple"
|
||||
label="Select a fruit"
|
||||
options={[
|
||||
{
|
||||
label: 'Apple',
|
||||
value: 'apple',
|
||||
},
|
||||
{
|
||||
label: 'Banana',
|
||||
value: 'banana',
|
||||
},
|
||||
{
|
||||
label: 'Orange',
|
||||
value: 'orange',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user