'use client' import { zodResolver } from '@hookform/resolvers/zod' import { useForm } from 'react-hook-form' import * as z from 'zod' import { Button, Form, Select, toast } from '../..' const FormSchema = z.object({ email: z .string({ required_error: 'Please select an email to display.', }) .email(), }) export function SelectFormDemo() { const form = useForm>({ resolver: zodResolver(FormSchema), }) function onSubmit(data: z.infer) { toast({ title: 'You submitted the following values:', description: (
                    
                        {JSON.stringify(data, null, 2)}
                    
                
), }) } return (
( Email m@example.com m@google.com m@support.com You can manage email addresses in your{' '} email settings . )} />
) }