@shoplflow/base 0.24.13 → 0.24.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.
- package/dist/index.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -888,12 +888,13 @@ var ModalProvider = ({ children }) => {
|
|
|
888
888
|
};
|
|
889
889
|
const dispatch = React2.useMemo(() => ({ addModal, removeModal }), []);
|
|
890
890
|
React2.useEffect(() => {
|
|
891
|
-
if (openedModals.length
|
|
892
|
-
|
|
893
|
-
return () => {
|
|
894
|
-
document.body.style.cssText = "overflow:unset";
|
|
895
|
-
};
|
|
891
|
+
if (openedModals.length !== 1) {
|
|
892
|
+
return;
|
|
896
893
|
}
|
|
894
|
+
document.body.style.cssText = "overflow:hidden";
|
|
895
|
+
return () => {
|
|
896
|
+
document.body.style.cssText = "overflow:unset";
|
|
897
|
+
};
|
|
897
898
|
}, [openedModals.length]);
|
|
898
899
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.ModalContext.Provider, { value: openedModals, children: /* @__PURE__ */ jsxRuntime.jsx(exports.ModalHandlerContext.Provider, { value: dispatch, children }) });
|
|
899
900
|
};
|
|
@@ -1908,7 +1909,7 @@ var DropdownButton = React2.forwardRef(
|
|
|
1908
1909
|
transition: {
|
|
1909
1910
|
duration: 0.2
|
|
1910
1911
|
},
|
|
1911
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DownArrowSolidXsmallIcon, color: "neutral400" })
|
|
1912
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { iconSource: ShoplAssets.DownArrowSolidXsmallIcon, color: "neutral400", sizeVar: "XS" })
|
|
1912
1913
|
}
|
|
1913
1914
|
)
|
|
1914
1915
|
] }))
|