Add a combobox story

This commit is contained in:
Andrey Okonetchnikov committed 2022-07-19 14:59:04 +02:00
1 parent 2c64577c5e
commit 620cc351bb
1 file changed
+24
@@ -0,0 +1,24 @@
import { ComponentStory } from "@storybook/react";
import React from "react";
import { Combobox } from "~/shared/design-system";
export default {
component: Combobox,
};
export const Simple: ComponentStory<typeof Combobox> = () => {
const options = [
{ label: "Apple" },
{ label: "Banana" },
{ label: "Orange" },
];
const [value, setValue] = React.useState(options[0]);
return (
<Combobox
name="fruit"
items={options}
value={value}
onValueChange={setValue}
/>
);
};