infoalloggi-monorepo/apps/infoalloggi/src/components/custom_ui/textarea.tsx

23 lines
825 B
TypeScript
Raw Normal View History

2025-08-04 17:45:44 +02:00
import { forwardRef, type TextareaHTMLAttributes } from "react";
import { cn } from "src/lib/utils";
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
2025-08-28 18:27:07 +02:00
({ className, ...props }, ref) => {
return (
<textarea
className={cn(
2025-10-10 16:18:43 +02:00
`flex min-h-[80px] w-full rounded-lg border border-border bg-background px-3 py-2 shadow-sm outline-hidden transition-all duration-200 hover:border-muted-foreground focus:border-foreground focus:ring-foreground disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-500 dark:focus:border-transparent dark:hover:border-neutral-400 dark:placeholder:text-neutral-400`,
2025-08-28 18:27:07 +02:00
className,
)}
ref={ref}
{...props}
/>
);
},
2025-08-04 17:45:44 +02:00
);
Textarea.displayName = "Textarea";
export { Textarea };