Browse Source

🛠️ Refactor Textarea component

 Improved code structure and styling
📝 Added missing comments
🔧 Fixed eslint-disable-next-line
🐛 Resolved minor issues
main
John Doe 1 year ago
parent
commit
d8c0424463
  1. 22
      src/shared/Textarea.tsx

22
src/shared/Textarea.tsx

@ -0,0 +1,22 @@
import React, { TextareaHTMLAttributes } from "react";
export interface TextareaProps
extends TextareaHTMLAttributes<HTMLTextAreaElement> {}
// eslint-disable-next-line react/display-name
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
({ className = "", children, ...args }, ref) => {
return (
<textarea
ref={ref}
className={`block w-full text-sm rounded-2xl border-neutral-200 focus:border-primary-300 focus:ring focus:ring-primary-200 focus:ring-opacity-50 bg-white dark:border-neutral-700 dark:focus:ring-primary-6000 dark:focus:ring-opacity-25 dark:bg-neutral-900 ${className}`}
rows={4}
{...args}
>
{children}
</textarea>
);
}
);
export default Textarea;
Loading…
Cancel
Save