Files
formbricks/packages/ui/components/Label.tsx
T
Matti Nannt 60f7103198 Revert & gradually use updated files (#280)
* revert to last working version

* add updated ui components

* update formbricks-com components

* apply prettier formatting

* update apps/web files
2023-05-10 00:20:43 +02:00

29 lines
907 B
TypeScript

"use client";
import * as React from "react";
import * as LabelPrimitive from "@radix-ui/react-label";
import { cn } from "@formbricks/lib/cn";
type LabelType = React.ForwardRefExoticComponent<
React.PropsWithoutRef<React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>> &
React.RefAttributes<React.ElementRef<typeof LabelPrimitive.Root>>
>;
const Label: LabelType = React.forwardRef<
React.ElementRef<typeof LabelPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
>(({ className, ...props }, ref) => (
<LabelPrimitive.Root
ref={ref}
className={cn(
"text-sm font-medium leading-none text-slate-800 disabled:opacity-70 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:text-slate-400 dark:peer-disabled:opacity-70",
className
)}
{...props}
/>
));
Label.displayName = LabelPrimitive.Root.displayName;
export { Label };