g1t/apps/web/app/components/ui/label.tsx
| 1 | import { Label as Primitive } from "radix-ui"; |
| 2 | import type { ComponentProps } from "react"; |
| 3 | |
| 4 | import { cn } from "../../lib/cn"; |
| 5 | |
| 6 | // shadcn/ui's label, styled with g1t's tokens. |
| 7 | |
| 8 | export function Label({ className, ...props }: ComponentProps<typeof Primitive.Root>) { |
| 9 | return ( |
| 10 | <Primitive.Root |
| 11 | className={cn( |
| 12 | "flex items-center gap-2 text-sm font-medium text-muted select-none", |
| 13 | "peer-disabled:cursor-not-allowed peer-disabled:opacity-50", |
| 14 | className, |
| 15 | )} |
| 16 | {...props} |
| 17 | /> |
| 18 | ); |
| 19 | } |