import type { Meta, StoryObj } from "@storybook/react-vite"; import { Select, type SelectProps } from "./Select"; import type { IOption } from "../../shared/types"; import { useState } from "react"; const meta = { title: "Components/Select", parameters: { layout: "centered", }, tags: ["autodocs"], } satisfies Meta; export default meta; type Story = StoryObj; const options = [ { label: "Red", value: "red" }, { label: "Green", value: "green" }, { label: "Blue", value: "blue" }, { label: "Yellow", value: "yellow" }, { label: "Purple", value: "purple" }, { label: "Orange", value: "orange" }, { label: "Black", value: "black" }, { label: "White", value: "white" }, { label: "Gray", value: "gray" }, { label: "Pink", value: "pink" }, ]; const SelectComponent = (props: Partial>) => { const [value, setValue] = useState | null>( (props.value as IOption) ?? null ); return (