2025-06-22 10:02:50 +02:00
|
|
|
import * as React from "react";
|
|
|
|
|
|
2026-01-31 00:20:04 +01:00
|
|
|
import { cn } from "@/utils/ui";
|
2025-06-22 10:02:50 +02:00
|
|
|
|
|
|
|
|
const Textarea = React.forwardRef<
|
2026-01-31 00:20:04 +01:00
|
|
|
HTMLTextAreaElement,
|
|
|
|
|
React.ComponentProps<"textarea">
|
2025-06-22 10:02:50 +02:00
|
|
|
>(({ className, ...props }, ref) => {
|
2026-01-31 00:20:04 +01:00
|
|
|
return (
|
|
|
|
|
<textarea
|
|
|
|
|
className={cn(
|
2026-02-08 17:06:16 +01:00
|
|
|
"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input bg-accent/50 flex min-h-[60px] w-full rounded-md border px-3 py-2 resize-none text-base shadow-xs outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
2026-01-31 00:20:04 +01:00
|
|
|
"focus-visible:border-primary focus-visible:ring-4 focus-visible:ring-primary/10",
|
|
|
|
|
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
ref={ref}
|
|
|
|
|
{...props}
|
|
|
|
|
/>
|
|
|
|
|
);
|
2025-06-22 10:02:50 +02:00
|
|
|
});
|
|
|
|
|
Textarea.displayName = "Textarea";
|
|
|
|
|
|
|
|
|
|
export { Textarea };
|