Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@s-ui/react-image-lazy-load

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-ui/react-image-lazy-load - npm Package Compare versions

Comparing version 1.20.0 to 1.21.0

8

lib/index.js

@@ -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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc