import type { ReactNode } from 'react'; import { useForm } from 'react-hook-form'; import { Button, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Textarea, } from 'cloudrite'; // Cloudrite is dark-only — foreground-coloured text and `border-border` are // invisible on the preview harness's white card body. Stories render on the // brand surface, which is also how a real screen is built. const Surface = ({ children }: { children: ReactNode }) => (
{children}
); type Values = { name: string; email: string; message: string }; // `Form` is react-hook-form's FormProvider — it needs a useForm() instance, and // FormField wires each control through Controller. This is the enquiry form on // the Cloudrite contact section. export const EnquiryForm = () => { const form = useForm({ defaultValues: { name: 'Jamie Lambert', email: 'jamie@cafe.co.nz', message: '' }, }); return (
e.preventDefault()}> ( Name )} /> ( Email We reply within one business day. )} /> ( How can we help?