summaryrefslogtreecommitdiff
path: root/driver/src/components/ui/label.tsx
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-12-21 01:26:51 +0200
committeromagdy7 <omar.professional8777@gmail.com>2023-12-21 01:26:51 +0200
commit7b379914e44583b9b097ed286b669ad244b176a1 (patch)
tree32fc660273161a92a0b9784ac5edd6f2f5eea58c /driver/src/components/ui/label.tsx
parentb84fe9a9c4c18a3f4e957f76ead34403c4316f76 (diff)
downloadcarpool-7b379914e44583b9b097ed286b669ad244b176a1.tar.xz
carpool-7b379914e44583b9b097ed286b669ad244b176a1.zip
Added Firestore support for both the driver app and the rider mobile app
Diffstat (limited to 'driver/src/components/ui/label.tsx')
-rw-r--r--driver/src/components/ui/label.tsx24
1 files changed, 24 insertions, 0 deletions
diff --git a/driver/src/components/ui/label.tsx b/driver/src/components/ui/label.tsx
new file mode 100644
index 0000000..683faa7
--- /dev/null
+++ b/driver/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<typeof LabelPrimitive.Root>,
+ React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
+ VariantProps<typeof labelVariants>
+>(({ className, ...props }, ref) => (
+ <LabelPrimitive.Root
+ ref={ref}
+ className={cn(labelVariants(), className)}
+ {...props}
+ />
+))
+Label.displayName = LabelPrimitive.Root.displayName
+
+export { Label }