react-progressive-image-loading
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -21,3 +21,3 @@ /// <reference types="react" /> | ||
}; | ||
componentWillMount(): void; | ||
constructor(props: ProgressiveImageProps); | ||
render(): JSX.Element; | ||
@@ -27,1 +27,2 @@ private fetch(src); | ||
} | ||
export default ProgressiveImage; |
@@ -16,15 +16,13 @@ "use strict"; | ||
__extends(ProgressiveImage, _super); | ||
function ProgressiveImage() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
ProgressiveImage.prototype.componentWillMount = function () { | ||
var _this = this; | ||
var _a = this.props, src = _a.src, preview = _a.preview; | ||
var initialBlur = this.props.initialBlur; | ||
this.setState({ src: "", blur: initialBlur }); | ||
this.fetch(preview) | ||
function ProgressiveImage(props) { | ||
var _this = _super.call(this, props) || this; | ||
var _a = _this.props, src = _a.src, preview = _a.preview; | ||
var initialBlur = _this.props.initialBlur; | ||
_this.setState({ src: "", blur: initialBlur }); | ||
_this.fetch(preview) | ||
.then(function (previewDataURI) { return _this.setState({ src: previewDataURI, blur: initialBlur }); }) | ||
.then(function () { return _this.fetch(src); }) | ||
.then(function (srcDataURI) { return _this.setState({ src: srcDataURI, blur: 0 }); }); | ||
}; | ||
return _this; | ||
} | ||
ProgressiveImage.prototype.render = function () { | ||
@@ -50,10 +48,11 @@ var src = this.state.src; | ||
}; | ||
ProgressiveImage.defaultProps = { | ||
transitionTime: 500, | ||
timingFunction: "ease", | ||
initialBlur: 10 | ||
}; | ||
return ProgressiveImage; | ||
}(React.Component)); | ||
ProgressiveImage.defaultProps = { | ||
transitionTime: 500, | ||
timingFunction: "ease", | ||
initialBlur: 10 | ||
}; | ||
exports.ProgressiveImage = ProgressiveImage; | ||
exports.default = ProgressiveImage; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-progressive-image-loading", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Progressively load images using a blur effect. Edit", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -15,2 +15,8 @@ # React Progressive Image Loading | ||
## Import | ||
```jsx | ||
import ProgressiveImage from "react-progressive-image-loading"; | ||
``` | ||
## Usage | ||
@@ -17,0 +23,0 @@ |
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
18652
52