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(
`border-border bg-background hover:border-muted-foreground focus:border-foreground focus:ring-foreground flex min-h-[80px] w-full rounded-lg border px-3 py-2 shadow-sm outline-hidden transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-500 dark:placeholder:text-neutral-400 dark:hover:border-neutral-400 dark:focus:border-transparent`,
className,
)}
ref={ref}
{...props}
/>
);
},
2025-08-04 17:45:44 +02:00
);
Textarea.displayName = "Textarea";
export { Textarea };