Raw
1 import * as React from "react"
2
3 import { inputBaseStyles } from "@/components/input"
4 import { clx } from "@/utils/clx"
5
6 /**
7 * This component is based on the `textarea` element and supports all of its props
8 */
9 const Textarea = React.forwardRef<
10 HTMLTextAreaElement,
11 React.ComponentPropsWithoutRef<"textarea">
12 >(({ className, ...props }, ref) => {
13 return (
14 <textarea
15 ref={ref}
16 className={clx(
17 inputBaseStyles,
18 "txt-small min-h-[60px] w-full px-2 py-1.5",
19 className
20 )}
21 {...props}
22 />
23 )
24 })
25 Textarea.displayName = "Textarea"
26
27 export { Textarea }