import React from "react"; import classNames from "./lib/classNames"; import { Switch as SwitchPrimitive } from "@headlessui/react"; export interface SwitchProps { onChange?: (value: boolean) => void; className?: string; disabled?: boolean; checked?: boolean; } export default function Switch({ className, disabled, onChange, checked, }: SwitchProps) { return ( undefined)} disabled={!onChange || disabled} checked={checked ?? false} > ); }