From 01b546cc816c4fb6b7389e5122b7802d7e724a2b Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Sun, 22 Feb 2026 19:47:13 +0800 Subject: refactor(shadcn): use base lyra instead --- packages/ui-new/src/components/ui/switch.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'packages/ui-new/src/components/ui/switch.tsx') diff --git a/packages/ui-new/src/components/ui/switch.tsx b/packages/ui-new/src/components/ui/switch.tsx index 14b3b5b..fef14e3 100644 --- a/packages/ui-new/src/components/ui/switch.tsx +++ b/packages/ui-new/src/components/ui/switch.tsx @@ -1,26 +1,29 @@ -import * as SwitchPrimitive from "@radix-ui/react-switch"; -import type * as React from "react"; +"use client"; + +import { Switch as SwitchPrimitive } from "@base-ui/react/switch"; import { cn } from "@/lib/utils"; function Switch({ className, + size = "default", ...props -}: React.ComponentProps) { +}: SwitchPrimitive.Root.Props & { + size?: "sm" | "default"; +}) { return ( ); -- cgit v1.2.3-70-g09d2