import "./HtmlSelect"; import { Meta, StoryObj } from "@storybook/react-vite"; import { expect, fn, userEvent, within } from "storybook/test"; import { iconClass } from "../../../../utils/iconClass"; import { useValue } from "../../../__fixtures__/useValue.hook"; import { Select } from "../Select"; const options = [ { label: "Option 1", value: "option-1" }, { label: "Option 2", value: "option-2" }, { label: "Option 3", value: "option-3" } ]; /** * HTML5 select component. * * ```tsx * import {Select} from "@tsed/react-formio/molecules/forms/select/all"; // import HTML5, ChoicesJS and React components * * // or * import {Select} from "@tsed/react-formio/molecules/forms/select/Select"; * import "@tsed/react-formio/molecules/forms/select/components/HtmlSelect"; // register only HTML5 component * * ``` */ export default { title: "forms/Select/Html5", component: Select, parameters: { layout: "centered", backgrounds: { default: "pearl" } }, args: {}, argTypes: { label: { control: "text" }, name: { control: "text" }, value: { control: "select", options: ["option-1", "option-2", "option-3"] }, size: { control: "radio", options: ["small", "normal"] }, placeholder: { control: "text" }, options: { control: "object" }, onChange: { action: "onChange" } }, tags: ["autodocs"], render(args) { // eslint-disable-next-line react-hooks/rules-of-hooks const { value, onChange } = useValue(args); return (