@s-ui/react-image-lazy-load
Advanced tools
Comparing version 1.20.0 to 1.21.0
@@ -0,3 +1,4 @@ | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
import { jsxs as _jsxs } from "react/jsx-runtime"; | ||
import PropTypes from 'prop-types'; | ||
import cx from 'classnames'; | ||
@@ -21,2 +22,4 @@ import SpinnerBasic from '@s-ui/react-spinner-basic'; | ||
aspectRatio = _ref$aspectRatio === void 0 ? '' : _ref$aspectRatio, | ||
_ref$onError = _ref.onError, | ||
onError = _ref$onError === void 0 ? function () {} : _ref$onError, | ||
_ref$offsetVertical = _ref.offsetVertical, | ||
@@ -44,5 +47,6 @@ offsetVertical = _ref$offsetVertical === void 0 ? 100 : _ref$offsetVertical, | ||
children: isNearScreen && /*#__PURE__*/_jsx("img", { | ||
alt: alt, | ||
className: BASE_CLASS + "-image", | ||
onError: onError, | ||
src: src, | ||
alt: alt, | ||
title: title | ||
@@ -49,0 +53,0 @@ }) |
{ | ||
"name": "@s-ui/react-image-lazy-load", | ||
"version": "1.20.0", | ||
"version": "1.21.0", | ||
"description": "SUI Image Lazy Load", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -15,2 +15,3 @@ import PropTypes from 'prop-types' | ||
aspectRatio = '', | ||
onError = () => {}, | ||
offsetVertical = 100, | ||
@@ -36,5 +37,6 @@ showSpinner = true, | ||
<img | ||
alt={alt} | ||
className={`${BASE_CLASS}-image`} | ||
onError={onError} | ||
src={src} | ||
alt={alt} | ||
title={title} | ||
@@ -50,2 +52,6 @@ /> | ||
/** | ||
* Specify how to handle, can be useful to specify a fallback image. | ||
*/ | ||
onError: PropTypes.func, | ||
/** | ||
* This option allows you to specify how far above and below the viewport you | ||
@@ -52,0 +58,0 @@ * want to begin displaying your content. |
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
12172
133