ui/src/design/TextArea/index.tsx
import * as React from "react";
import { twMergeClsx } from "~/util/helpers";
export interface TextareaProps
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
custom?: boolean; // just to avoid error An interface declaring no members is equivalent to its supertype @typescript-eslint/no-empty-interface
}
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className, ...props }, ref) => (
<textarea
className={twMergeClsx(
"flex h-20 w-full rounded-md border bg-transparent py-2 px-3 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"border-gray-4 placeholder:text-gray-8 focus:ring-gray-4 focus:ring-offset-gray-1",
"dark:border-gray-dark-4 dark:placeholder:text-gray-dark-8 dark:focus:ring-gray-dark-4 dark:focus:ring-offset-gray-dark-1",
className
)}
ref={ref}
{...props}
/>
)
);
Textarea.displayName = "Textarea";
export { Textarea };