From bf649aa040d9f310c7b249f27f1758e63838ba91 Mon Sep 17 00:00:00 2001 From: memeriau Date: Mon, 24 Jan 2022 23:45:10 +0100 Subject: [PATCH] add component for d day informations --- .../DDayInformations/DDaysInformations.tsx | 76 ++++++++++++++++++ .../DDayInformations/styles.module.scss | 78 +++++++++++++++++++ src/pages/DayWishes/DayWishes.tsx | 2 + src/theme/form.scss | 1 + 4 files changed, 157 insertions(+) create mode 100644 src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx create mode 100755 src/components/VolunteerBoard/DDayInformations/styles.module.scss diff --git a/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx b/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx new file mode 100644 index 0000000..45ab31a --- /dev/null +++ b/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx @@ -0,0 +1,76 @@ +import { FC, memo, useCallback, useRef, useState } from "react" +import styles from "./styles.module.scss" + +const sizes = ["XS", "S", "M", "L", "XL", "XXL"] + +const DDayInformations: FC = (): JSX.Element | null => { + const sizeRef = useRef(null) + const dietRef = useRef(null) + const ageRef = useRef(null) + const commentRef = useRef(null) + const [has2Shirts, setHas2Shirts] = useState(null) + + const onSubmit = useCallback(() => { + console.log("on submit") + }, []) + + const onHas2ShirtsClick = useCallback( + (value) => { + setHas2Shirts(value) + }, + [setHas2Shirts] + ) + + return ( +
+
Informations pour le festival
+
+
J'ai déjà 2 t-shirts
+ + + {has2Shirts === false && ( +
+ + +
+ )} +
+
+ + +
+
+ + +
+
+ +