import { useAutoAnimate } from "@formkit/auto-animate/react"; import React, { ReactNode } from "react"; import Switch from "./Switch"; import { Label } from "./form"; type Props = { children?: ReactNode; title: string; description?: string; checked: boolean; disabled?: boolean; onCheckedChange?: (checked: boolean) => void; "data-testid"?: string; }; function SettingsToggle({ checked, onCheckedChange, description, title, children, disabled, ...rest }: Props) { const [animateRef] = useAutoAnimate(); return ( <>
{description &&

{description}

}
{children && (
{checked && children}
)}
); } export default SettingsToggle;