react-ui-basics 0.0.241 → 0.0.242

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-ui-basics",
3
- "version": "0.0.241",
3
+ "version": "0.0.242",
4
4
  "description": "",
5
5
  "module": "index.js",
6
6
  "_main": "index.cjs.js",
package/src/Modal.tsx CHANGED
@@ -33,7 +33,7 @@ export interface ModalProps {
33
33
  container?: Element | DocumentFragment
34
34
  children?: ReactNode
35
35
  closeIcon?: string | ReactElement
36
- beforeClose?: (close: VoidFunction) => void
36
+ beforeClose?: (close: VoidFunction, e: MouseEvent | KeyboardEvent) => void
37
37
  onOpen?: VoidFunction
38
38
  onClose?: VoidFunction
39
39
  open?: (open: VoidFunction) => void
@@ -74,7 +74,7 @@ class Modal extends AbstractModal {
74
74
  const beforeClose = (e) => {
75
75
  stopPropagation(e);
76
76
  const bc = getBeforeClose() || props().beforeClose;
77
- if (!bc || bc(that.close))
77
+ if (!bc || bc(that.close, e))
78
78
  that.close();
79
79
  };
80
80