import clsx from "clsx"; import { motion } from "motion/react"; import type { ComponentProps } from "react"; import styles from "./index.module.scss"; import { Switch as UnstyledSwitch } from "../unstyled/Switch/index.js"; type OwnProps = { isPending?: boolean | undefined; }; type Props = Omit, keyof OwnProps> & OwnProps; export const Switch = ({ children, className, isPending, isDisabled, ...props }: Props) => ( {(args) => ( <>
{typeof children === "function" ? children(args) : children}
)}
);