diff --git a/src/components/PopupModal/PopupModal.tsx b/src/components/PopupModal/PopupModal.tsx new file mode 100644 index 0000000..8a17efa --- /dev/null +++ b/src/components/PopupModal/PopupModal.tsx @@ -0,0 +1,74 @@ +import React from 'react'; + +import CrossIcon2 from '@icon/CrossIcon2'; + +const PopupModal = ({ + title = 'Information', + message, + setIsModalOpen, + handleConfirm, + handleClose, + children, +}: { + title?: string; + message?: string; + setIsModalOpen: React.Dispatch>; + handleConfirm: () => void; + handleClose?: () => void; + children?: React.ReactElement; +}) => { + const _handleClose = () => { + handleClose && handleClose(); + setIsModalOpen(false); + }; + + return ( +
+
+
+
+

+ {title} +

+ +
+ + {message && ( +
+
+ {message} +
+
+ )} + + {children} + +
+ + +
+
+
+
+ ); +}; + +export default PopupModal;