17 lines
405 B
TypeScript
17 lines
405 B
TypeScript
import { forwardRef, type TextareaHTMLAttributes } from 'react';
|
|
import { cn } from '@/lib/cn';
|
|
|
|
export const Textarea = forwardRef<
|
|
HTMLTextAreaElement,
|
|
TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
>(function Textarea({ className, rows = 3, ...rest }, ref) {
|
|
return (
|
|
<textarea
|
|
ref={ref}
|
|
rows={rows}
|
|
className={cn('field__textarea', className)}
|
|
{...rest}
|
|
/>
|
|
);
|
|
});
|