From e26d821f738525477472e631d170d9ed218c1603 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 25 Feb 2022 19:17:09 +0100 Subject: chore: combine input/textarea/select in a single component --- src/components/Form/Select/Select.tsx | 56 ----------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 src/components/Form/Select/Select.tsx (limited to 'src/components/Form/Select/Select.tsx') diff --git a/src/components/Form/Select/Select.tsx b/src/components/Form/Select/Select.tsx deleted file mode 100644 index feab991..0000000 --- a/src/components/Form/Select/Select.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { ChangeEvent, ReactElement, SetStateAction } from 'react'; -import styles from './Select.module.scss'; - -type SelectOptions = { - id: string; - name: string; - value: string; -}; - -const Select = ({ - options, - id, - name, - value, - setValue, - required = false, - label, -}: { - options: SelectOptions[]; - id: string; - name: string; - value: string; - setValue: (value: SetStateAction) => void; - required?: boolean; - label?: ReactElement; -}) => { - const getOptions = () => { - return options.map((option) => ( - - )); - }; - - const handleChange = (event: ChangeEvent) => { - setValue(event.target.value); - }; - - return ( - <> - {label} - - - ); -}; - -export default Select; -- cgit v1.2.3