react-progressive-image-loading
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -9,2 +9,3 @@ /// <reference types="react" /> | ||
background?: boolean; | ||
backgroundImages?: string[]; | ||
transitionTime?: number; | ||
@@ -11,0 +12,0 @@ timingFunction?: string; |
@@ -56,3 +56,3 @@ "use strict"; | ||
Object.keys(this.props) | ||
.filter(function (prop) { return ["style", "src", "preview", "background", "transitionTime", "timingFunction"].indexOf(prop) === -1; }) | ||
.filter(function (prop) { return ["style", "src", "preview", "background", "transitionTime", "timingFunction", "backgroundImages", "children"].indexOf(prop) === -1; }) | ||
.forEach(function (prop) { return _this.clonedProps[prop] = _this.props[prop]; }); | ||
@@ -70,4 +70,5 @@ }; | ||
var src = this.state.src; | ||
var backgroundImages = this.props.backgroundImages; | ||
var style = { | ||
backgroundImage: "url(" + src + ")" | ||
backgroundImage: (backgroundImages ? backgroundImages.join(",") + "," : "") + "url(" + src + ")" | ||
}; | ||
@@ -74,0 +75,0 @@ return Object.assign(style, this.getStyle()); |
{ | ||
"name": "react-progressive-image-loading", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Progressively load images using a blur effect. Edit", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -36,1 +36,10 @@ # React Progressive Image Loading | ||
``` | ||
In case of `background=true`, it is possible to add some layers on top of the background image, for instance: | ||
```jsx | ||
<ProgressiveImage | ||
preview="/images/tiny-preview.png" src="/images/preview.png" background={true} | ||
backgroundImages={["linear-gradient(to top, rgba(31,31,31,0.3), rgba(31,31,31,0.3))"]} | ||
/> | ||
``` |
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
21095
110
45