import { DetailedHTMLProps, HTMLAttributes } from "react"; import { twMerge } from "tailwind-merge"; export type TWUI_TOGGLE_PROPS = DetailedHTMLProps< HTMLAttributes, HTMLDivElement > & { active?: boolean; setActive?: React.Dispatch>; circleProps?: DetailedHTMLProps< HTMLAttributes, HTMLDivElement >; }; /** * # Toggle Component * @className_wrapper twui-toggle-wrapper * @className_circle twui-toggle-circle */ export default function Toggle({ circleProps, active, setActive, ...props }: TWUI_TOGGLE_PROPS) { return (
setActive?.(!active)} >
); }