code fixes and adding modal
This commit is contained in:
26
src/components/UI/ModalComponent.tsx
Normal file
26
src/components/UI/ModalComponent.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import type React from "react";
|
||||
import Modal from "react-modal";
|
||||
|
||||
type ModalComponentProps = {
|
||||
isModalOpen: boolean;
|
||||
children: React.ReactNode;
|
||||
};
|
||||
|
||||
const ModalComponent = ({
|
||||
isModalOpen,
|
||||
children,
|
||||
close,
|
||||
}: ModalComponentProps) => {
|
||||
return (
|
||||
<Modal
|
||||
isOpen={isModalOpen}
|
||||
onRequestClose={close}
|
||||
className="bg-[#1e2a38] p-6 rounded-lg shadow-lg max-w-[65%] mx-auto mt-20 w-full h-[75%] z-100"
|
||||
overlayClassName="fixed inset-0 bg-[#1e2a38]/70 flex justify-center items-start z-100"
|
||||
>
|
||||
{children}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default ModalComponent;
|
||||
Reference in New Issue
Block a user