"use client"; import React from 'react'; import { useForm, Controller } from 'react-hook-form'; import { z } from 'zod'; import { zodResolver } from '@hookform/resolvers/zod'; const appearanceFormSchema = z.object({ theme: z.enum(['light', 'dark'], { required_error: 'Please select a theme.', }), font: z.enum(['inter', 'manrope', 'system'], { invalid_type_error: 'Select a font', required_error: 'Please select a font.', }), }); type AppearanceFormValues = z.infer; const defaultValues: Partial = { theme: 'light', }; export function AppearanceForm() { const { control, handleSubmit } = useForm({ resolver: zodResolver(appearanceFormSchema), defaultValues, }); const onSubmit = (data: AppearanceFormValues) => { console.log(JSON.stringify(data, null, 2)); }; return (
( )} />

Set the font you want to use in the dashboard.

Select the theme for the dashboard.

(
)} />
); }