mirror of
https://bitbucket.org/Mattrixwv/mattrixwvreactcomponents.git
synced 2025-12-06 21:53:57 -05:00
Created switches
This commit is contained in:
@@ -1,7 +1,31 @@
|
||||
export default function LightSwitch(){
|
||||
import type { MattrixwvSwitchProps } from "$/types/Input";
|
||||
import clsx from "clsx";
|
||||
import MattrixwvSwitch from "./MattrixwvSwitch";
|
||||
|
||||
|
||||
export default function LightSwitch({
|
||||
className,
|
||||
disabled,
|
||||
...props
|
||||
}: MattrixwvSwitchProps){
|
||||
return (
|
||||
<div>
|
||||
Light Switch
|
||||
</div>
|
||||
<MattrixwvSwitch
|
||||
{...props}
|
||||
className={clsx(
|
||||
"bg-gray-400",
|
||||
className,
|
||||
{
|
||||
"data-checked:bg-white": !disabled,
|
||||
"data-checked:bg-neutral-300/80": disabled
|
||||
}
|
||||
)}
|
||||
knobClassName={clsx(
|
||||
{
|
||||
"bg-black": !disabled,
|
||||
"bg-neutral-800": disabled
|
||||
}
|
||||
)}
|
||||
disabled={disabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user