aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Form/Input/Input.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Form/Input/Input.tsx')
-rw-r--r--src/components/Form/Input/Input.tsx50
1 files changed, 0 insertions, 50 deletions
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);