diff --git a/src/components/ModalSelectGuests.tsx b/src/components/ModalSelectGuests.tsx new file mode 100644 index 0000000..42f2418 --- /dev/null +++ b/src/components/ModalSelectGuests.tsx @@ -0,0 +1,104 @@ +"use client"; + +import React, { FC, Fragment, useState } from "react"; +import { Dialog, Transition } from "@headlessui/react"; +import { XMarkIcon } from "@heroicons/react/24/solid"; +import ButtonPrimary from "@/shared/ButtonPrimary"; +import GuestsInput from "@/app/(client-components)/(HeroSearchForm2Mobile)/GuestsInput"; + +interface ModalSelectGuestsProps { + renderChildren?: (p: { openModal: () => void }) => React.ReactNode; +} + +const ModalSelectGuests: FC = ({ renderChildren }) => { + const [showModal, setShowModal] = useState(false); + + // FOR RESET ALL DATA WHEN CLICK CLEAR BUTTON + // + function closeModal() { + setShowModal(false); + } + + function openModal() { + setShowModal(true); + } + + const renderButtonOpenModal = () => { + return renderChildren ? ( + renderChildren({ openModal }) + ) : ( + + ); + }; + + return ( + <> + {renderButtonOpenModal()} + + +
+
+ + + <> +
+ +
+ +
+
+
+
+ +
+
+
+
+
+ + { + closeModal(); + }} + > + Save + +
+ +
+
+
+
+
+
+ + ); +}; + +export default ModalSelectGuests;