@@ -11,7 +11,7 @@ const labelVariants = cva('peer-disabled:cursor-not-allowed peer-disabled:opacit
1111 variant : {
1212 default : 'text-sm font-normal leading-none'
1313 } ,
14- theme : {
14+ color : {
1515 'foreground-1' : 'text-foreground-1' ,
1616 'foreground-2' : 'text-foreground-2' ,
1717 'foreground-5' : 'text-foreground-5' ,
@@ -20,15 +20,15 @@ const labelVariants = cva('peer-disabled:cursor-not-allowed peer-disabled:opacit
2020 } ,
2121 defaultVariants : {
2222 variant : 'default' ,
23- theme : 'foreground-1'
23+ color : 'foreground-1'
2424 }
2525} )
2626
2727const LabelRoot = forwardRef <
2828 ElementRef < typeof LabelPrimitive . Root > ,
29- ComponentPropsWithoutRef < typeof LabelPrimitive . Root > & VariantProps < typeof labelVariants >
30- > ( ( { className, variant, theme , ...props } , ref ) => (
31- < LabelPrimitive . Root ref = { ref } className = { cn ( labelVariants ( { variant, theme } ) , className ) } { ...props } />
29+ Omit < ComponentPropsWithoutRef < typeof LabelPrimitive . Root > , 'color' > & VariantProps < typeof labelVariants >
30+ > ( ( { className, variant, color , ...props } , ref ) => (
31+ < LabelPrimitive . Root ref = { ref } className = { cn ( labelVariants ( { variant, color } ) , className ) } { ...props } />
3232) )
3333LabelRoot . displayName = LabelPrimitive . Root . displayName
3434
@@ -38,9 +38,9 @@ interface LabelProps extends VariantProps<typeof labelVariants>, PropsWithChildr
3838 className ?: string
3939}
4040
41- const Label = ( { htmlFor, optional, theme , variant, children, className } : LabelProps ) => {
41+ const Label = ( { htmlFor, optional, color , variant, children, className } : LabelProps ) => {
4242 return (
43- < LabelRoot htmlFor = { htmlFor } variant = { variant } theme = { theme } className = { className } >
43+ < LabelRoot htmlFor = { htmlFor } variant = { variant } color = { color } className = { className } >
4444 { children } { optional && < span className = "text-foreground-7 align-top" > (optional)</ span > }
4545 </ LabelRoot >
4646 )
0 commit comments