/
DME
/
Notes
Обзор
Документация
Войти
/
DME
/
Notes
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/components/ui/label.tsx
26 строк
757 B
Karasique333
Commit
19 июн 2025, 15:09
19 июн 2025, 15:09
d96c829
Код
Авторство
О чём код?
'use client' import * as LabelPrimitive from '@radix-ui/react-label' import { type VariantProps, cva } from 'class-variance-authority' import * as React from 'react' import { cn } from '@/lib/utils' const labelVariants = cva( 'text-sm font-medium leading-none text-neutral-950 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:text-white' ) const Label = React.forwardRef< React.ElementRef<typeof LabelPrimitive.Root>, React.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 }