import clsx from "clsx"; import type { ComponentProps, ReactNode } from "react"; import { Switch as BaseSwitch } from "react-aria-components"; type Props = Omit, "children"> & { preLabel?: ReactNode; postLabel?: ReactNode; size?: "small"; }; export const Switch = ({ preLabel, postLabel, className, size, ...props }: Props) => ( {preLabel &&
{preLabel}
}
{postLabel && (
{postLabel}
)} );