import { useAutoAnimate } from "@formkit/auto-animate/react"; import type { ReactNode } from "react"; import { Label } from ".."; import Switch from "./Switch"; 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;