intelicoreact 1.2.26 → 1.2.27

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.
@@ -90,16 +90,18 @@ function useMobileModal(_ref) {
90
90
  }, [scrollTop, scrollTopPrev]); // Dynamic Modal Positioning
91
91
 
92
92
  (0, _react.useEffect)(function () {
93
- if (modal && modalContainer) {
93
+ if (modalHeight && modalMobileContainerRef !== null && modalMobileContainerRef !== void 0 && modalMobileContainerRef.current) {
94
94
  if (modalHeight <= windowHeight) {
95
- modalContainer.style.display = 'flex';
96
- modalContainer.style.alignItems = 'flex-end';
95
+ modalMobileContainerRef.current.style.display = 'flex';
96
+ modalMobileContainerRef.current.style.alignItems = 'flex-end';
97
97
  } else {
98
- modalContainer.style.removeProperty('display');
99
- modalContainer.style.removeProperty('align-items');
98
+ var _modalContainer$style, _modalContainer$style2;
99
+
100
+ modalContainer === null || modalContainer === void 0 ? void 0 : (_modalContainer$style = modalContainer.style) === null || _modalContainer$style === void 0 ? void 0 : _modalContainer$style.removeProperty('display');
101
+ modalContainer === null || modalContainer === void 0 ? void 0 : (_modalContainer$style2 = modalContainer.style) === null || _modalContainer$style2 === void 0 ? void 0 : _modalContainer$style2.removeProperty('align-items');
100
102
  }
101
103
  }
102
- }, [modalHeight, windowHeight]);
104
+ }, [modalHeight, windowHeight, modalMobileContainerRef === null || modalMobileContainerRef === void 0 ? void 0 : modalMobileContainerRef.current]);
103
105
  var MODALS_LOGIC = {
104
106
  IS_HEADER_HIDDEN: !isMobile || noMobileModalLogic ? false : footerBottom * -1 <= footerHeight || scrollDirection === SCROLL_DIRECTION.DOWN,
105
107
  IS_HEADER_STICKY: !isMobile || noMobileModalLogic ? false : headerTop <= 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "1.2.26",
3
+ "version": "1.2.27",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [