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; LockedIcon?: React.ReactNode; onCheckedChange?: (checked: boolean) => void; "data-testid"?: string; tooltip?: string; }; function SettingsToggle({ checked, onCheckedChange, description, LockedIcon, title, children, disabled, tooltip, ...rest }: Props) { const [animateRef] = useAutoAnimate(); return ( <>
{description &&

{description}

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