From 824a70d303db265cad5579c59e6f9c84a71288f7 Mon Sep 17 00:00:00 2001 From: fullsizemalt <106900403+fullsizemalt@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:00:06 -0800 Subject: [PATCH] fix: Update Switch component to properly handle onCheckedChange prop --- frontend/components/ui/switch.tsx | 49 ++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/frontend/components/ui/switch.tsx b/frontend/components/ui/switch.tsx index 90d25ae..022dff7 100644 --- a/frontend/components/ui/switch.tsx +++ b/frontend/components/ui/switch.tsx @@ -3,23 +3,38 @@ import * as React from "react" import { cn } from "@/lib/utils" -const Switch = React.forwardRef< - HTMLInputElement, - React.InputHTMLAttributes ->(({ className, ...props }, ref) => ( - -)) +interface SwitchProps extends Omit, 'onChange'> { + onCheckedChange?: (checked: boolean) => void +} + +const Switch = React.forwardRef( + ({ className, checked, onCheckedChange, disabled, ...props }, ref) => ( + + ) +) Switch.displayName = "Switch" export { Switch }