diff --git a/package.json b/package.json index b2dd2fb..af1b837 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@domotz/react-popup-manager", - "version": "3.2.3", + "version": "3.2.5", "description": "Manage react popups, Modals, Lightboxes, Notifications, etc. easily", "license": "MIT", "main": "dist/index.js", diff --git a/src/PopupWrapper/index.tsx b/src/PopupWrapper/index.tsx index 5c3ac66..c829e10 100644 --- a/src/PopupWrapper/index.tsx +++ b/src/PopupWrapper/index.tsx @@ -12,6 +12,18 @@ const useRerender = () => { return React.useCallback(() => rerender({}), []) } +function Popup({ show, onClose, currentPopup, ...props}){ + const onCloseClick = React.useCallback((params: any) => { + return onClose(currentPopup, params) + }, [onClose, currentPopup]) + + return +} + export function PopupsWrapper({popupManager}: PopupsWrapperProps){ const rerender = useRerender(); @@ -31,11 +43,12 @@ export function PopupsWrapper({popupManager}: PopupsWrapperProps){ return <> { popupManager.popups.map((currentPopup: PopupItem) => ( - onClose(currentPopup, params)} + currentPopup={currentPopup} + onClose={onClose} /> )) }