@matchain/matchid-sdk-react 0.1.53-alpha.14 → 0.1.53-alpha.15

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.
@@ -708,7 +708,7 @@ import { useEffect as useEffect2, useMemo } from "react";
708
708
  import { encodeDeployData } from "viem";
709
709
 
710
710
  // src/context/ModalContext.tsx
711
- import { useState, useCallback, createContext, useContext } from "react";
711
+ import React, { useState, useCallback, createContext, useContext } from "react";
712
712
  import { createPortal } from "react-dom";
713
713
  import { jsx, jsxs } from "react/jsx-runtime";
714
714
  var ModalContext = createContext(null);
@@ -735,7 +735,8 @@ function ModalProvider({ children }) {
735
735
  visible: true,
736
736
  index: modalIndex,
737
737
  zIndex: newZIndex,
738
- content: content({ close: () => closeModal(modalIndex), zIndex: newZIndex })
738
+ content,
739
+ close: () => closeModal(modalIndex)
739
740
  }],
740
741
  highestZIndex: newZIndex
741
742
  };
@@ -750,7 +751,8 @@ function ModalProvider({ children }) {
750
751
  visible: true,
751
752
  index: modalIndex,
752
753
  zIndex: newZIndex,
753
- content: /* @__PURE__ */ jsx(ModalDrawer, { showClose: true, isOpen: true, onClose: () => closeModal(modalIndex), title: props.title, zIndex: newZIndex, onBack: props.onBack, children: /* @__PURE__ */ jsx(props.content, { close: () => closeModal(modalIndex), zIndex: newZIndex }) })
754
+ close: () => closeModal(modalIndex),
755
+ content: ({ close, zIndex }) => /* @__PURE__ */ jsx(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ jsx(props.content, { close, zIndex }) })
754
756
  }],
755
757
  highestZIndex: newZIndex
756
758
  };
@@ -758,7 +760,7 @@ function ModalProvider({ children }) {
758
760
  }, [getNextIndex, closeModal]);
759
761
  const modalElements = modalState.modals.sort((a, b) => b.zIndex - a.zIndex).map(
760
762
  (modal) => modal.visible ? createPortal(
761
- modal.content,
763
+ React.createElement(modal.content, { zIndex: modal.zIndex, close: modal.close }),
762
764
  document.body
763
765
  ) : null
764
766
  );
@@ -7278,4 +7280,4 @@ export {
7278
7280
  MatchProvider,
7279
7281
  useMatch
7280
7282
  };
7281
- //# sourceMappingURL=chunk-OEKLKWFJ.mjs.map
7283
+ //# sourceMappingURL=chunk-BC4HS373.mjs.map