pr_01m47d15m3e54sn21z27rpy5n9/apps/web/app/components/ui/label.tsx

19 lines524 bytesCodeBlame
1import { Label as Primitive } from "radix-ui";
2import type { ComponentProps } from "react";
3
4import { cn } from "../../lib/cn";
5
6// shadcn/ui's label, styled with g1t's tokens.
7
8export 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}