react-progress-loading
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -61,3 +61,5 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
smallImageStyles = _ref.smallImageStyles, | ||
originalImageStyles = _ref.originalImageStyles; | ||
originalImageStyles = _ref.originalImageStyles, | ||
originalImageAlt = _ref.originalImageAlt, | ||
smallImageAlt = _ref.smallImageAlt; | ||
var imageRef = React.useRef(null); | ||
@@ -74,2 +76,3 @@ var smallRef = React.useRef(null); | ||
}, /*#__PURE__*/React__default.createElement("img", { | ||
alt: smallImageAlt || 'small', | ||
style: _extends({}, s.smallImage, smallImageStyles), | ||
@@ -79,2 +82,3 @@ ref: smallRef, | ||
}), /*#__PURE__*/React__default.createElement("img", { | ||
alt: originalImageAlt || 'original', | ||
style: _extends({}, s.bigImage, originalImageStyles), | ||
@@ -81,0 +85,0 @@ ref: imageRef, |
@@ -58,3 +58,5 @@ import React, { useRef } from 'react'; | ||
smallImageStyles = _ref.smallImageStyles, | ||
originalImageStyles = _ref.originalImageStyles; | ||
originalImageStyles = _ref.originalImageStyles, | ||
originalImageAlt = _ref.originalImageAlt, | ||
smallImageAlt = _ref.smallImageAlt; | ||
var imageRef = useRef(null); | ||
@@ -71,2 +73,3 @@ var smallRef = useRef(null); | ||
}, /*#__PURE__*/React.createElement("img", { | ||
alt: smallImageAlt || 'small', | ||
style: _extends({}, s.smallImage, smallImageStyles), | ||
@@ -76,2 +79,3 @@ ref: smallRef, | ||
}), /*#__PURE__*/React.createElement("img", { | ||
alt: originalImageAlt || 'original', | ||
style: _extends({}, s.bigImage, originalImageStyles), | ||
@@ -78,0 +82,0 @@ ref: imageRef, |
{ | ||
"name": "react-progress-loading", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Progressively load images using a medium like blur effect.", | ||
@@ -5,0 +5,0 @@ "author": "arnavozil", |
@@ -21,2 +21,3 @@ # react-progress-loading | ||
For a working demo, checkout my [sandbox](https://codesandbox.io/s/react-progress-loading-rcxhl?file=/src/Image.js) | ||
## Usage | ||
@@ -37,2 +38,4 @@ | ||
originalImageStyles={{}} | ||
originalImageAlt='' | ||
smallImageAlt='' | ||
/>) | ||
@@ -43,4 +46,12 @@ } | ||
## Props | ||
| originalImageSrc | | ||
| --- | | ||
| `Required: Yes` | | ||
| `Description: The url to original image` | | ||
| `Type: string (url)` | | ||
## License | ||
MIT © [arnavozil](https://github.com/arnavozil) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
15995
186
55