import { Meta, StoryObj } from '@storybook/react'; import { z } from 'zod'; import { Button } from '../button'; import { Form } from './form'; import { FormDrawer } from './form-drawer'; import { Input } from './input'; import { Select } from './select'; import { Textarea } from './textarea'; const MyForm = ({ hideSubmit = false }: { hideSubmit?: boolean }) => { return (
{ alert(JSON.stringify(values, null, 2)); }} schema={z.object({ title: z.string().min(1, 'Required'), description: z.string().min(1, 'Required'), type: z.string().min(1, 'Required'), })} id="my-form" > {({ register, formState }) => ( <>