/ app / src / components / ui / textarea.tsx
textarea.tsx
 1  import * as React from "react"
 2  
 3  import { cn } from "@/lib/utils"
 4  
 5  export interface TextareaProps
 6    extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
 7  
 8  const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
 9    ({ className, ...props }, ref) => {
10      return (
11        <textarea
12          className={cn(
13            "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
14            className
15          )}
16          ref={ref}
17          {...props}
18        />
19      )
20    }
21  )
22  Textarea.displayName = "Textarea"
23  
24  export { Textarea }