diff --git a/src/app/(listing-detail)/(components)/ModalReserveMobile.tsx b/src/app/(listing-detail)/(components)/ModalReserveMobile.tsx new file mode 100644 index 0000000..46b29d0 --- /dev/null +++ b/src/app/(listing-detail)/(components)/ModalReserveMobile.tsx @@ -0,0 +1,79 @@ +import React, { FC, Fragment, useState } from "react"; +import CheckOutPagePageMain from "@/app/checkout/PageMain"; +import { Dialog, Transition } from "@headlessui/react"; +import { XMarkIcon } from "@heroicons/react/24/solid"; + +interface ModalReserveMobileProps { + renderChildren?: (p: { openModal: () => void }) => React.ReactNode; +} + +const ModalReserveMobile: FC = ({ + renderChildren, +}) => { + const [showModal, setShowModal] = useState(false); + + // + function closeModal() { + setShowModal(false); + } + + function openModal() { + setShowModal(true); + } + + const renderButtonOpenModal = () => { + return renderChildren ? ( + renderChildren({ openModal }) + ) : ( + + ); + }; + + return ( + <> + {renderButtonOpenModal()} + + +
+
+ + + <> +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + ); +}; + +export default ModalReserveMobile;