mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 21:53:57 -05:00
34 lines
611 B
TypeScript
34 lines
611 B
TypeScript
import type { MattrixwvSwitchProps } from "$/types/InputTypes";
|
|
import clsx from "clsx";
|
|
import MattrixwvSwitch from "./MattrixwvSwitch";
|
|
|
|
|
|
export default function PrimarySwitch({
|
|
className,
|
|
knobClassName,
|
|
disabled,
|
|
...props
|
|
}: MattrixwvSwitchProps){
|
|
return (
|
|
<MattrixwvSwitch
|
|
{...props}
|
|
className={clsx(
|
|
"bg-gray-400",
|
|
className,
|
|
{
|
|
"data-checked:bg-blue-600": !disabled,
|
|
"data-checked:bg-blue-400/80": disabled
|
|
}
|
|
)}
|
|
knobClassName={clsx(
|
|
knobClassName,
|
|
{
|
|
"bg-white": !disabled,
|
|
"bg-gray-200": disabled
|
|
}
|
|
)}
|
|
disabled={disabled}
|
|
/>
|
|
);
|
|
}
|