import type { Meta, StoryObj } from "@storybook/react-vite"; import { FORM_TEST_DECORATOR } from "../../../../.storybook/decorators"; import { ChoiceField } from "./choicefield"; const meta: Meta = { title: "Form/Choicefield", component: ChoiceField, }; export default meta; type Story = StoryObj; const FORM_TEST_ARG_TYPES = { onChange: { action: "onChange" }, }; export const Select: Story = { args: { label: "Select school year", name: "school_year", options: [ { label: "Freshman" }, { label: "Sophomore" }, { label: "Junior", selected: true }, { label: "Senior" }, { label: "Graduate" }, ], }, argTypes: FORM_TEST_ARG_TYPES, decorators: [FORM_TEST_DECORATOR], }; export const CheckboxGroup = { ...Select, args: { ...Select.args, type: "checkbox" }, };