mirror of
https://github.com/DocNR/POWR.git
synced 2025-04-19 19:01:18 +00:00
28 lines
848 B
TypeScript
28 lines
848 B
TypeScript
![]() |
import * as LabelPrimitive from '@rn-primitives/label';
|
||
|
import * as React from 'react';
|
||
|
import { cn } from '@/lib/utils';
|
||
|
|
||
|
const Label = React.forwardRef<LabelPrimitive.TextRef, LabelPrimitive.TextProps>(
|
||
|
({ className, onPress, onLongPress, onPressIn, onPressOut, ...props }, ref) => (
|
||
|
<LabelPrimitive.Root
|
||
|
className='web:cursor-default'
|
||
|
onPress={onPress}
|
||
|
onLongPress={onLongPress}
|
||
|
onPressIn={onPressIn}
|
||
|
onPressOut={onPressOut}
|
||
|
>
|
||
|
<LabelPrimitive.Text
|
||
|
ref={ref}
|
||
|
className={cn(
|
||
|
'text-sm text-foreground native:text-base font-medium leading-none web:peer-disabled:cursor-not-allowed web:peer-disabled:opacity-70',
|
||
|
className
|
||
|
)}
|
||
|
{...props}
|
||
|
/>
|
||
|
</LabelPrimitive.Root>
|
||
|
)
|
||
|
);
|
||
|
Label.displayName = LabelPrimitive.Root.displayName;
|
||
|
|
||
|
export { Label };
|