From fb687b9cf0a1e7a451ea8c32fb4d0890606762b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hampus=20Sj=C3=B6berg?= Date: Sat, 14 Sep 2019 18:31:14 +0200 Subject: [PATCH] Add fadeDuration prop --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2b80ced..2635a34 100644 --- a/index.js +++ b/index.js @@ -13,6 +13,7 @@ var iface = { downsampling: PropTypes.number, blurStyle: PropTypes.string, vibrant: PropTypes.bool, + fadeDuration: PropTypes.number, } }; var RCTSajjadBlurOverlay = Platform.select({ @@ -38,7 +39,7 @@ export default class BlurOverlay extends React.Component { this.state.fadeIn, { toValue: 1, - duration: 500, + duration: this.props.fadeDuration !== undefined ? this.props.fadeDuration : 500, useNativeDriver: true } ).start(); @@ -49,7 +50,7 @@ export default class BlurOverlay extends React.Component { this.state.fadeIn, { toValue: 0, - duration: 500, + duration: this.props.fadeDuration !== undefined ? this.props.fadeDuration : 500, useNativeDriver: true } ).start(()=>this.setState({showBlurOverlay: false}));