From e144547bedc80cef094d331ca58cc072ca5c6766 Mon Sep 17 00:00:00 2001 From: gearnode Date: Wed, 12 Feb 2025 09:02:58 -0800 Subject: [PATCH] Add missing comp Signed-off-by: gearnode --- apps/console/package.json | 5 ++- apps/console/src/components/ui/checkbox.tsx | 28 +++++++++++++ apps/console/src/components/ui/label.tsx | 24 +++++++++++ .../console/src/components/ui/radio-group.tsx | 42 +++++++++++++++++++ 4 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 apps/console/src/components/ui/checkbox.tsx create mode 100644 apps/console/src/components/ui/label.tsx create mode 100644 apps/console/src/components/ui/radio-group.tsx diff --git a/apps/console/package.json b/apps/console/package.json index 373f58469..55df41e73 100644 --- a/apps/console/package.json +++ b/apps/console/package.json @@ -30,7 +30,10 @@ "react-router": "^7.1.5", "relay-runtime": "^18.2.0", "tailwind-merge": "^3.0.1", - "tailwindcss-animate": "^1.0.7" + "tailwindcss-animate": "^1.0.7", + "@radix-ui/react-checkbox": "^1.0.4", + "@radix-ui/react-label": "^2.0.2", + "@radix-ui/react-radio-group": "^1.1.3" }, "devDependencies": { "@babel/core": "^7.26.7", diff --git a/apps/console/src/components/ui/checkbox.tsx b/apps/console/src/components/ui/checkbox.tsx new file mode 100644 index 000000000..f0712d709 --- /dev/null +++ b/apps/console/src/components/ui/checkbox.tsx @@ -0,0 +1,28 @@ +import * as React from "react" +import * as CheckboxPrimitive from "@radix-ui/react-checkbox" +import { Check } from "lucide-react" + +import { cn } from "@/lib/utils" + +const Checkbox = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => ( + + + + + +)) +Checkbox.displayName = CheckboxPrimitive.Root.displayName + +export { Checkbox } \ No newline at end of file diff --git a/apps/console/src/components/ui/label.tsx b/apps/console/src/components/ui/label.tsx new file mode 100644 index 000000000..a9eec775f --- /dev/null +++ b/apps/console/src/components/ui/label.tsx @@ -0,0 +1,24 @@ +import * as React from "react" +import * as LabelPrimitive from "@radix-ui/react-label" +import { cva, type VariantProps } from "class-variance-authority" + +import { cn } from "@/lib/utils" + +const labelVariants = cva( + "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" +) + +const Label = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef & + VariantProps +>(({ className, ...props }, ref) => ( + +)) +Label.displayName = LabelPrimitive.Root.displayName + +export { Label } \ No newline at end of file diff --git a/apps/console/src/components/ui/radio-group.tsx b/apps/console/src/components/ui/radio-group.tsx new file mode 100644 index 000000000..a9f443f56 --- /dev/null +++ b/apps/console/src/components/ui/radio-group.tsx @@ -0,0 +1,42 @@ +import * as React from "react" +import * as RadioGroupPrimitive from "@radix-ui/react-radio-group" +import { Circle } from "lucide-react" + +import { cn } from "@/lib/utils" + +const RadioGroup = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + ) +}) +RadioGroup.displayName = RadioGroupPrimitive.Root.displayName + +const RadioGroupItem = React.forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>(({ className, ...props }, ref) => { + return ( + + + + + + ) +}) +RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName + +export { RadioGroup, RadioGroupItem } \ No newline at end of file