From fc224d133eab67557c150b11f67eb8883e61d551 Mon Sep 17 00:00:00 2001 From: William Candillon Date: Tue, 2 May 2017 10:53:00 +0200 Subject: [PATCH] feat(component): Add maxBlur property --- src/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index dad96f3..ce7b636 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -10,6 +10,7 @@ export interface ProgressiveImageProps { backgroundImages?: string[]; transitionTime?: number; timingFunction?: string; + maxBlur?: number; } export interface ProgressiveImageState { @@ -23,15 +24,16 @@ export class ProgressiveImage extends React.Component this.setState({ src: previewDataURI, blur: 10 })) + .then(previewDataURI => this.setState({ src: previewDataURI, blur: maxBlur })) .then(() => this.fetch(src)) .then(srcDataURI => this.setState({ src: srcDataURI, blur: 0 })); }