Adjust Dropdown story
This commit is contained in:
parent
b325e249a3
commit
dfde40f3b4
|
@ -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",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue