Files
MattrixwvReactComponents/lib/component/input/switch/LightSwitch.tsx

34 lines
612 B
TypeScript

import type { MattrixwvSwitchProps } from "$/types/InputTypes";
import clsx from "clsx";
import MattrixwvSwitch from "./MattrixwvSwitch";
export default function LightSwitch({
className,
knobClassName,
disabled,
...props
}: MattrixwvSwitchProps){
return (
<MattrixwvSwitch
{...props}
className={clsx(
"bg-gray-400",
className,
{
"data-checked:bg-white": !disabled,
"data-checked:bg-neutral-300/80": disabled
}
)}
knobClassName={clsx(
knobClassName,
{
"bg-black": !disabled,
"bg-neutral-800": disabled
}
)}
disabled={disabled}
/>
);
}