@s-ui/react-atom-image
Advanced tools
Comparing version 2.14.0 to 2.15.0
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; | ||
var _excluded = ["alt", "bgStyles", "decoding", "errorIcon", "errorText", "fetchpriority", "loading", "onError", "onLoad", "placeholder", "skeleton", "sources", "spinner"]; | ||
import { cloneElement, useCallback, useEffect, useRef, useState } from 'react'; | ||
import { useCallback, useEffect, useRef, useState } from 'react'; | ||
import cx from 'classnames'; | ||
import PropTypes from 'prop-types'; | ||
import Injector from '@s-ui/react-primitive-injector'; | ||
import ErrorImage from './ErrorImage.js'; | ||
@@ -75,5 +76,2 @@ import { BASE_CLASS, BASE_CLASS_FIGURE, CLASS_ERROR, CLASS_IMAGE, CLASS_PLACEHOLDER, CLASS_SKELETON, CLASS_SPINNER, DECODING, FETCHPRIORITY, LOADING } from './settings.js'; | ||
}; | ||
var spinnerExtended = spinner && /*#__PURE__*/cloneElement(spinner, { | ||
className: CLASS_SPINNER | ||
}); | ||
return /*#__PURE__*/_jsxs("div", { | ||
@@ -98,3 +96,6 @@ className: classNames, | ||
}) | ||
}), !error && isLoading && spinnerExtended, error && /*#__PURE__*/_jsx(ErrorImage, { | ||
}), !error && isLoading && spinner && /*#__PURE__*/_jsx(Injector, { | ||
classNames: CLASS_SPINNER, | ||
children: spinner | ||
}), error && /*#__PURE__*/_jsx(ErrorImage, { | ||
className: CLASS_ERROR, | ||
@@ -101,0 +102,0 @@ icon: errorIcon, |
{ | ||
"name": "@s-ui/react-atom-image", | ||
"version": "2.14.0", | ||
"version": "2.15.0", | ||
"description": "", | ||
@@ -12,3 +12,4 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@s-ui/component-dependencies": "1" | ||
"@s-ui/component-dependencies": "1", | ||
"@s-ui/react-primitive-injector": "1" | ||
}, | ||
@@ -15,0 +16,0 @@ "keywords": [], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14708
147
2
+ Added@s-ui/react-primitive-injector@1.2.0(transitive)