From 37916a0cae873c70b0ef344107d28e404f1f5a21 Mon Sep 17 00:00:00 2001 From: ghost2023 Date: Fri, 22 May 2026 11:37:24 +0300 Subject: [PATCH] chore: add switch component from shadcn to ui-common --- packages/ui-common/src/components/switch.tsx | 33 ++++++++++++++++++++ packages/ui-common/src/index.ts | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 packages/ui-common/src/components/switch.tsx diff --git a/packages/ui-common/src/components/switch.tsx b/packages/ui-common/src/components/switch.tsx new file mode 100644 index 000000000..76190b7c9 --- /dev/null +++ b/packages/ui-common/src/components/switch.tsx @@ -0,0 +1,33 @@ +import * as React from "react" +import { Switch as SwitchPrimitive } from "radix-ui" + +import { cn } from "../lib/utils" + +function Switch({ + className, + size = "default", + ...props +}: React.ComponentProps & { + size?: "sm" | "default" +}) { + return ( + + + + ) +} + +export { Switch } diff --git a/packages/ui-common/src/index.ts b/packages/ui-common/src/index.ts index 4b6dd2b94..ca2df73bf 100644 --- a/packages/ui-common/src/index.ts +++ b/packages/ui-common/src/index.ts @@ -30,4 +30,6 @@ export * from "./components/dropdown-menu"; export * from "./components/data-table"; export * from "./components/dialog"; export * from "./components/SmartFileInput"; +export * from "./components/select"; +export * from "./components/switch"; export * from "./components/field";