import React from "react"; import { useFormContext } from "react-hook-form"; import ColorPickerSection from "./colorPickerSection"; import DesignPreview from "./designPreview"; import Combobox from "../combobox/combobox"; import { Button } from "../radioButtons/radioGroup/radioGroup"; export default function DesignSettings({ closeSidebar, }: { isSidebarConfig?: boolean; closeSidebar?: () => void; }) { const { watch, setValue } = useFormContext(); // Pull directly from form state: const hex = watch("hex"); const updatedFontType = watch("font"); const updatedBorderState = watch("borderState"); // When the user picks a new color, write it back into the form: const onHexChange: React.Dispatch> = ( newValue ) => { const hexValue = typeof newValue === "function" ? newValue(hex) : newValue; setValue("hex", hexValue, { shouldDirty: true }); }; const fontButtons: Button[] = [ { label: "Overpass (Justin Legal Standard)", value: "Overpass" }, { label: "Arial", value: "Arial" }, { label: "Courier New", value: "CourierNew" }, { label: "Times New Roman", value: "TimesNewRoman" }, { label: "Trebuchet MS", value: "TrebuchetMS" }, { label: "Verdana", value: "Verdana" }, ]; return (

Passendes Design für deine Kanzlei

{/* Now driven by form.watch("hex") */}
Aa
{["Round", "Rounded", "Square"].map((state) => ( ))}
); }