Updates
This commit is contained in:
@@ -1,24 +1,12 @@
|
||||
import { DetailedHTMLProps, TextareaHTMLAttributes } from "react";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import Input, { InputProps } from "./Input";
|
||||
|
||||
/**
|
||||
* # Textarea Component
|
||||
* @className twui-textarea
|
||||
*/
|
||||
export default function Textarea({
|
||||
export default function Textarea<KeyType extends string>({
|
||||
componentRef,
|
||||
...props
|
||||
}: DetailedHTMLProps<
|
||||
TextareaHTMLAttributes<HTMLTextAreaElement>,
|
||||
HTMLTextAreaElement
|
||||
>) {
|
||||
return (
|
||||
<textarea
|
||||
{...props}
|
||||
className={twMerge(
|
||||
"w-full px-4 py-2 border border-slate-300 rounded",
|
||||
"twui-textarea",
|
||||
props.className
|
||||
)}
|
||||
/>
|
||||
);
|
||||
}: InputProps<KeyType>) {
|
||||
return <Input istextarea {...props} componentRef={componentRef} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user