import type { MattrixwvButtonSwitchProps } from "$/types/InputTypes"; import { Switch } from "@headlessui/react"; import { forwardRef } from "react"; const ButtonSwitch = forwardRef(({ id, className, name, value, defaultChecked, checked, onChange, disabled, onNode, offNode }, ref ) => { return ( {({ checked }) => ( <> {checked ? onNode : offNode} )} ); }); ButtonSwitch.displayName = "ButtonSwitch"; export default ButtonSwitch;