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