@trafilea/afrodita-components 5.0.0-beta.44 → 5.0.0-beta.45
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/build/index.d.ts +2 -0
- package/build/index.esm.js +11 -2
- package/build/index.esm.js.map +1 -1
- package/build/index.js +11 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -12634,7 +12634,7 @@ var ProductGalleryMobile = function (_a) {
|
|
|
12634
12634
|
var templateObject_1$a;
|
|
12635
12635
|
|
|
12636
12636
|
var Portal = function (_a) {
|
|
12637
|
-
var id = _a.id, className = _a.className, children = _a.children;
|
|
12637
|
+
var id = _a.id, className = _a.className, children = _a.children, overflow = _a.overflow, style = _a.style;
|
|
12638
12638
|
var _b = React$2.useState(false), mounted = _b[0], setMounted = _b[1];
|
|
12639
12639
|
var container = React$2.useRef(null);
|
|
12640
12640
|
React$2.useEffect(function () {
|
|
@@ -12648,10 +12648,19 @@ var Portal = function (_a) {
|
|
|
12648
12648
|
throw new Error("Unable to find/create container (".concat(id, ")"));
|
|
12649
12649
|
}
|
|
12650
12650
|
element.dataset.testId = id;
|
|
12651
|
-
element.style.overflow = 'hidden';
|
|
12652
12651
|
setMounted(true);
|
|
12653
12652
|
container.current = element;
|
|
12654
12653
|
}, [id]);
|
|
12654
|
+
React$2.useEffect(function () {
|
|
12655
|
+
if (!mounted) {
|
|
12656
|
+
return;
|
|
12657
|
+
}
|
|
12658
|
+
container.current.style.overflow = overflow ? 'visible' : 'hidden';
|
|
12659
|
+
for (var key in style) {
|
|
12660
|
+
// @ts-ignore
|
|
12661
|
+
container.current.style[key] = style[key];
|
|
12662
|
+
}
|
|
12663
|
+
}, [style, overflow, mounted]);
|
|
12655
12664
|
React$2.useEffect(function () {
|
|
12656
12665
|
if (mounted) {
|
|
12657
12666
|
container.current.className = className !== null && className !== void 0 ? className : '';
|