Adjust Dropdown story

This commit is contained in:
Arnaud 2024-08-28 10:03:26 +02:00
parent b325e249a3
commit dfde40f3b4
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ type Props = {
const Template = (p: Props) => { const Template = (p: Props) => {
const [value, setValue] = useState<string>(""); const [value, setValue] = useState<string>("");
const onChange = (e: ChangeEvent<HTMLInputElement>) => { const onChange = (e: ChangeEvent<HTMLInputElement>) => {
p.onChange(e); p.onChange(e);
setValue(e.currentTarget.value); setValue(e.currentTarget.value);
@ -57,6 +58,8 @@ const Template = (p: Props) => {
onChange={onChange} onChange={onChange}
onSelected={onSelected} onSelected={onSelected}
value={value} value={value}
id={"dropdown"}
label={"Dropdown"}
options={[ options={[
{ {
title: "File1.pdf", title: "File1.pdf",
@ -81,5 +84,7 @@ export const CustomStyle: Story = {
options: [], options: [],
style: { "--codex-input-border": "1px solid red" }, style: { "--codex-input-border": "1px solid red" },
value: "", value: "",
id: "dropdown",
label: "Dropdown",
}, },
}; };