feat(frontend): add shadcn ui primitives and compatibility bridge

This commit is contained in:
Sagit
2026-02-19 05:14:42 +00:00
parent c5124a01e6
commit 12c50df6a7
43 changed files with 2839 additions and 0 deletions
@@ -0,0 +1,31 @@
import * as React from "react";
import { Switch as BaseSwitch } from "@/components/ui/switch";
import { cn } from "@/lib/utils";
export interface SwitchProps extends Omit<React.ComponentProps<typeof BaseSwitch>, "checked" | "onCheckedChange"> {
classNames?: Record<string, string>;
color?: string;
isDisabled?: boolean;
isSelected?: boolean;
onValueChange?: (value: boolean) => void;
size?: string;
}
export function Switch({
className,
isDisabled,
isSelected,
onValueChange,
...props
}: SwitchProps) {
return (
<BaseSwitch
checked={Boolean(isSelected)}
className={cn(className)}
disabled={isDisabled}
onCheckedChange={onValueChange}
{...props}
/>
);
}