@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 CHANGED
@@ -1634,6 +1634,8 @@ declare const RadioInput: ({ name, value, id, label, checked, disabled, onChange
1634
1634
  declare type PortalProps = {
1635
1635
  id: string;
1636
1636
  className?: string;
1637
+ overflow?: boolean;
1638
+ style?: CSSProperties;
1637
1639
  };
1638
1640
  declare const Portal: FC<PortalProps>;
1639
1641
 
@@ -12608,7 +12608,7 @@ var ProductGalleryMobile = function (_a) {
12608
12608
  var templateObject_1$a;
12609
12609
 
12610
12610
  var Portal = function (_a) {
12611
- var id = _a.id, className = _a.className, children = _a.children;
12611
+ var id = _a.id, className = _a.className, children = _a.children, overflow = _a.overflow, style = _a.style;
12612
12612
  var _b = useState(false), mounted = _b[0], setMounted = _b[1];
12613
12613
  var container = useRef(null);
12614
12614
  useEffect(function () {
@@ -12622,10 +12622,19 @@ var Portal = function (_a) {
12622
12622
  throw new Error("Unable to find/create container (".concat(id, ")"));
12623
12623
  }
12624
12624
  element.dataset.testId = id;
12625
- element.style.overflow = 'hidden';
12626
12625
  setMounted(true);
12627
12626
  container.current = element;
12628
12627
  }, [id]);
12628
+ useEffect(function () {
12629
+ if (!mounted) {
12630
+ return;
12631
+ }
12632
+ container.current.style.overflow = overflow ? 'visible' : 'hidden';
12633
+ for (var key in style) {
12634
+ // @ts-ignore
12635
+ container.current.style[key] = style[key];
12636
+ }
12637
+ }, [style, overflow, mounted]);
12629
12638
  useEffect(function () {
12630
12639
  if (mounted) {
12631
12640
  container.current.className = className !== null && className !== void 0 ? className : '';