23 lines
863 B
TypeScript
23 lines
863 B
TypeScript
|
|
import { forwardRef, type TextareaHTMLAttributes } from "react";
|
||
|
|
import { cn } from "src/lib/utils";
|
||
|
|
|
||
|
|
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
||
|
|
|
||
|
|
const Textarea = forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||
|
|
({ 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}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
},
|
||
|
|
);
|
||
|
|
Textarea.displayName = "Textarea";
|
||
|
|
|
||
|
|
export { Textarea };
|