@lumx/react 3.7.6-alpha.14 → 3.7.6-alpha.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/index.js
CHANGED
|
@@ -13735,15 +13735,19 @@ const Thumbnail = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
13735
13735
|
}), /*#__PURE__*/React.createElement("span", {
|
|
13736
13736
|
className: `${CLASSNAME$1f}__background`
|
|
13737
13737
|
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
13738
|
+
// Use placeholder image size
|
|
13738
13739
|
width: loadingPlaceholderImage === null || loadingPlaceholderImage === void 0 ? void 0 : loadingPlaceholderImage.naturalWidth,
|
|
13739
13740
|
height: loadingPlaceholderImage === null || loadingPlaceholderImage === void 0 ? void 0 : loadingPlaceholderImage.naturalHeight
|
|
13740
13741
|
}, imgProps, {
|
|
13741
|
-
style: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
13742
|
-
|
|
13742
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({
|
|
13743
|
+
// Reserve space while loading (when possible)
|
|
13744
|
+
width: isLoading ? (imgProps === null || imgProps === void 0 ? void 0 : imgProps.width) || (loadingPlaceholderImage === null || loadingPlaceholderImage === void 0 ? void 0 : loadingPlaceholderImage.naturalWidth) : undefined
|
|
13745
|
+
}, imgProps === null || imgProps === void 0 ? void 0 : imgProps.style), imageErrorStyle), focusPointStyle), loadingStyle),
|
|
13746
|
+
ref: useMergeRefs(setImgElement, propImgRef),
|
|
13743
13747
|
className: classnames(handleBasicClasses({
|
|
13744
13748
|
prefix: `${CLASSNAME$1f}__image`,
|
|
13745
13749
|
isLoading,
|
|
13746
|
-
hasDefinedSize:
|
|
13750
|
+
hasDefinedSize: Boolean((imgProps === null || imgProps === void 0 ? void 0 : imgProps.height) && imgProps.width)
|
|
13747
13751
|
}), imgProps === null || imgProps === void 0 ? void 0 : imgProps.className),
|
|
13748
13752
|
crossOrigin: crossOrigin,
|
|
13749
13753
|
src: image,
|