import { ComponentMeta, ComponentStory } from "@storybook/react"; import * as React from "react"; import { useStore } from "../../hooks"; import { Select } from "./"; const options = [ { label: "Option 1", value: "option1" }, { label: "Option 2", value: "option2" }, { label: "Option 3", value: "option3" }, { label: "Option 4", value: "option4" }, { label: "Option 5", value: "option5" }, ]; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { title: "Example/Select", component: Select, args: { options, placeholder: "This is a demo placeholder", getOptionLabel: (option) => option.label, }, } as ComponentMeta; // More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args const Template: ComponentStory = (args) => ( option} onChange={(value) => { console.log("Selected value", value); }} /> ); };