From e26d821f738525477472e631d170d9ed218c1603 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 25 Feb 2022 19:17:09 +0100
Subject: chore: combine input/textarea/select in a single component

---
 src/components/Form/Input/Input.tsx | 50 -------------------------------------
 1 file changed, 50 deletions(-)
 delete mode 100644 src/components/Form/Input/Input.tsx

(limited to 'src/components/Form/Input/Input.tsx')

diff --git a/src/components/Form/Input/Input.tsx b/src/components/Form/Input/Input.tsx
deleted file mode 100644
index 07f0410..0000000
--- a/src/components/Form/Input/Input.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import {
-  ChangeEvent,
-  ForwardedRef,
-  forwardRef,
-  ReactElement,
-  SetStateAction,
-} from 'react';
-import styles from '../Form.module.scss';
-
-type InputType = 'text' | 'email' | 'number' | 'search';
-
-const Input = (
-  {
-    id,
-    name,
-    value,
-    setValue,
-    type = 'text',
-    label,
-  }: {
-    id: string;
-    name: string;
-    value: string;
-    setValue: (value: SetStateAction<string>) => void;
-    type?: InputType;
-    label?: ReactElement;
-  },
-  ref: ForwardedRef<HTMLInputElement>
-) => {
-  const updateValue = (e: ChangeEvent<HTMLInputElement>) => {
-    setValue(e.target.value);
-  };
-
-  return (
-    <>
-      {label}
-      <input
-        ref={ref}
-        type={type}
-        id={id}
-        name={name}
-        value={value}
-        onChange={updateValue}
-        className={styles.field}
-      />
-    </>
-  );
-};
-
-export default forwardRef(Input);
-- 
cgit v1.2.3

