-
When I last used Radix, when installing a primitive, it would generate a react component file like so: const labelVariants = cva(
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
)
const Label = forwardRef<
ElementRef<typeof LabelPrimitive.Root>,
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 } What changed? |
Beta Was this translation helpful? Give feedback.
Answered by
chr-ge
Jul 26, 2024
Replies: 1 comment
-
Turns out I was using shadcn/ui. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chr-ge
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Turns out I was using shadcn/ui.