2025-09-12 08:21:52 +01:00
|
|
|
import type React from "react";
|
|
|
|
|
import Modal from "react-modal";
|
|
|
|
|
|
|
|
|
|
type ModalComponentProps = {
|
|
|
|
|
isModalOpen: boolean;
|
|
|
|
|
children: React.ReactNode;
|
2025-09-12 13:28:14 +01:00
|
|
|
close: () => void;
|
2025-09-12 08:21:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const ModalComponent = ({
|
|
|
|
|
isModalOpen,
|
|
|
|
|
children,
|
|
|
|
|
close,
|
|
|
|
|
}: ModalComponentProps) => {
|
|
|
|
|
return (
|
|
|
|
|
<Modal
|
|
|
|
|
isOpen={isModalOpen}
|
|
|
|
|
onRequestClose={close}
|
2025-09-17 11:39:26 +01:00
|
|
|
className="bg-[#1e2a38] p-6 rounded-lg shadow-lg max-w-[90%] mx-auto mt-[1%] md:w-[70%] md:h-[90%] z-[100] overflow-y-auto max-h-screen"
|
2025-09-12 08:21:52 +01:00
|
|
|
overlayClassName="fixed inset-0 bg-[#1e2a38]/70 flex justify-center items-start z-100"
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
|
</Modal>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default ModalComponent;
|