"use client" import { zodResolver } from "@hookform/resolvers/zod" import { ChevronDownIcon } from "@radix-ui/react-icons" import { useForm } from "react-hook-form" import { z } from "zod" import { cn } from "@/lib/utils" import { toast } from "@/hooks/use-toast" import { Button, buttonVariants } from "@/components/ui/button" import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, } from "@/components/ui/form" import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group" 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 // This can come from your database or API. const defaultValues: Partial = { theme: "light", } export function AppearanceForm() { const form = useForm({ resolver: zodResolver(appearanceFormSchema), defaultValues, }) function onSubmit(data: AppearanceFormValues) { toast({ title: "You submitted the following values:", description: (
          {JSON.stringify(data, null, 2)}
        
), }) } return (
( Font
Set the font you want to use in the dashboard.
)} /> ( Theme Select the theme for the dashboard.
Light
Dark )} /> ) }