'use client' import { zodResolver } from '@hookform/resolvers/zod' import { useForm } from 'react-hook-form' import * as z from 'zod' import { Button, Form, Input } from '../../index.ts' import {formSchema} from "../Checkbox/checkbox-demo-with-form.tsx"; export function ProfileForm() { // 1. Define your form. const form = useForm>({ resolver: zodResolver(formSchema), defaultValues: { username: '', }, }) // 2. Define a submit handler. function onSubmit(values: z.infer) { // Do something with the form values. // ✅ This will be type-safe and validated. console.log(values) } // ... return (
( Username This is your public display name. )} />
) }