Update themed components with refs and css

This commit is contained in:
2026-02-10 21:09:36 -05:00
parent 456feed128
commit 2e54b81d8f
72 changed files with 1147 additions and 562 deletions

View File

@@ -1,14 +1,15 @@
import type { MattrixwvSwitchProps } from "$/types/InputTypes";
import clsx from "clsx";
import { forwardRef } from "react";
import MattrixwvSwitch from "./MattrixwvSwitch";
export default function TertiarySwitch({
const TertiarySwitch = forwardRef<HTMLButtonElement, MattrixwvSwitchProps>(({
className,
knobClassName,
disabled,
...props
}: MattrixwvSwitchProps){
}, ref ) => {
return (
<MattrixwvSwitch
{...props}
@@ -16,18 +17,23 @@ export default function TertiarySwitch({
"bg-gray-400",
className,
{
"data-checked:bg-purple-600": !disabled,
"data-checked:bg-purple-400/80": disabled
"data-checked:bg-tertiary": !disabled,
"data-checked:bg-tertiary-light/80": disabled
}
)}
knobClassName={clsx(
knobClassName,
{
"bg-white": !disabled,
"bg-gray-200": disabled
"bg-neutral-light": disabled
}
)}
disabled={disabled}
ref={ref}
/>
);
}
});
TertiarySwitch.displayName = "TertiarySwitch";
export default TertiarySwitch;