From eb459cc248a5940a14193b20d263ffee3d345026 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 16 Dec 2021 13:40:12 +0100 Subject: chore: create contact page --- src/components/Form/TextArea/TextArea.tsx | 42 +++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/components/Form/TextArea/TextArea.tsx (limited to 'src/components/Form/TextArea/TextArea.tsx') diff --git a/src/components/Form/TextArea/TextArea.tsx b/src/components/Form/TextArea/TextArea.tsx new file mode 100644 index 0000000..729ef6d --- /dev/null +++ b/src/components/Form/TextArea/TextArea.tsx @@ -0,0 +1,42 @@ +import { ChangeEvent, SetStateAction } from 'react'; +import styles from '../Form.module.scss'; + +const TextArea = ({ + id, + name, + value, + setValue, + required = false, + label, +}: { + id: string; + name: string; + value: string; + setValue: (value: SetStateAction) => void; + required?: boolean; + label?: string; +}) => { + const updateValue = (e: ChangeEvent) => { + setValue(e.target.value); + }; + + return ( + <> + {label && ( + + )} +