@plasmicapp/react-web 0.2.87 → 0.2.89

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.
@@ -813,7 +813,14 @@ var PlasmicImg = /*#__PURE__*/React__default.forwardRef(function PlasmicImg(prop
813
813
  loader = props.loader,
814
814
  imgRef = props.imgRef,
815
815
  style = props.style,
816
- rest = _objectWithoutPropertiesLoose(props, ["src", "className", "displayWidth", "displayHeight", "displayMinWidth", "displayMinHeight", "displayMaxWidth", "displayMaxHeight", "quality", "loader", "imgRef", "style"]);
816
+ loading = props.loading,
817
+ rest = _objectWithoutPropertiesLoose(props, ["src", "className", "displayWidth", "displayHeight", "displayMinWidth", "displayMinHeight", "displayMaxWidth", "displayMaxHeight", "quality", "loader", "imgRef", "style", "loading"]);
818
+
819
+ var imgProps = Object.assign({}, rest, {
820
+ // Default loading to "lazy" if not specified (which is different from the
821
+ // html img, which defaults to eager!)
822
+ loading: loading != null ? loading : "lazy"
823
+ });
817
824
 
818
825
  var _ref = typeof src === "string" || !src ? {
819
826
  fullWidth: undefined,
@@ -831,7 +838,8 @@ var PlasmicImg = /*#__PURE__*/React__default.forwardRef(function PlasmicImg(prop
831
838
  src: srcStr,
832
839
  className: className,
833
840
  style: style
834
- }, rest, {
841
+ }, imgProps, {
842
+ loading: loading,
835
843
  ref: mergeRefs(imgRef, outerRef)
836
844
  }));
837
845
  }
@@ -946,7 +954,7 @@ var PlasmicImg = /*#__PURE__*/React__default.forwardRef(function PlasmicImg(prop
946
954
  quality: quality,
947
955
  ref: imgRef,
948
956
  style: style ? pick(style, "objectFit", "objectPosition") : undefined,
949
- imgProps: rest,
957
+ imgProps: imgProps,
950
958
  className: "__wab_img"
951
959
  }));
952
960
  });
@@ -2970,9 +2978,7 @@ function useTriggeredOverlay(plasmicClass, props, config, outerRef) {
2970
2978
  restoreFocus: true
2971
2979
  }, createElement(DismissButton, {
2972
2980
  onDismiss: state.close
2973
- }), children, createElement(DismissButton, {
2974
- onDismiss: state.close
2975
- })), _extends2));
2981
+ }), children), _extends2));
2976
2982
 
2977
2983
  var overrides = (_overrides = {}, _overrides[config.root] = {
2978
2984
  props: mergeProps(overlayProps, getStyleProps(props), {