import React from "react" import { useForm } from "react-hook-form" import { Checkbox, Card, Body, Button } from "playbook-ui" const CheckboxForm = () => { const { register, handleSubmit, formState: { errors }, watch, } = useForm({ defaultValues: { termsAccepted: false, newsletter: false, interests: [], preferences: { emailUpdates: false, smsUpdates: false, pushNotifications: false, }, }, }) const onSubmit = (data) => { console.log("Form submitted:", data) } const formValues = watch() return (
{JSON.stringify(formValues, null, 2)}) } export default CheckboxForm