From 06f3116a33660adeff67ccefbd43e9ffb1864278 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 9 Sep 2023 17:21:46 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Refactor=20Input=20component=20?= =?UTF-8?q?=F0=9F=93=A6=20Improve=20code=20structure=20and=20styling=20?= =?UTF-8?q?=F0=9F=94=8D=20Enhance=20readability=20and=20maintainability=20?= =?UTF-8?q?=E2=9C=A8=20Add=20forwardRef=20for=20better=20usability=20?= =?UTF-8?q?=F0=9F=90=9B=20Fix=20minor=20bugs=20and=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/Input.tsx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/shared/Input.tsx diff --git a/src/shared/Input.tsx b/src/shared/Input.tsx new file mode 100644 index 0000000..e70525e --- /dev/null +++ b/src/shared/Input.tsx @@ -0,0 +1,34 @@ +import React, { InputHTMLAttributes } from "react"; + +export interface InputProps extends InputHTMLAttributes { + sizeClass?: string; + fontClass?: string; + rounded?: string; +} + +// eslint-disable-next-line react/display-name +const Input = React.forwardRef( + ( + { + className = "", + sizeClass = "h-11 px-4 py-3", + fontClass = "text-sm font-normal", + rounded = "rounded-2xl", + children, + type = "text", + ...args + }, + ref + ) => { + return ( + + ); + } +); + +export default Input;