From 5bef019389015ed00c016b0d194a0604e7962c25 Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Sun, 21 May 2017 11:33:36 +0100 Subject: [PATCH] Fix deprecation warning of accessing View.propTypes --- src/BlurView.android.js | 4 ++-- src/BlurView.ios.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BlurView.android.js b/src/BlurView.android.js index a702f38..8c6cbd5 100644 --- a/src/BlurView.android.js +++ b/src/BlurView.android.js @@ -1,5 +1,5 @@ import React, { Component, PropTypes } from 'react'; -import { View, requireNativeComponent, DeviceEventEmitter, } from 'react-native'; +import { View, requireNativeComponent, DeviceEventEmitter, ViewPropTypes } from 'react-native'; const OVERLAY_COLORS = { light: 'rgba(255, 255, 255, 0.2)', @@ -74,7 +74,7 @@ class BlurView extends Component { } BlurView.propTypes = { - ...View.propTypes, + ...(ViewPropTypes || View.propTypes), blurAmount: PropTypes.number, blurType: PropTypes.oneOf(['dark', 'light', 'xlight']), diff --git a/src/BlurView.ios.js b/src/BlurView.ios.js index d4a5de5..8014fb1 100644 --- a/src/BlurView.ios.js +++ b/src/BlurView.ios.js @@ -1,5 +1,5 @@ import React, { Component, PropTypes } from 'react'; -import { View, requireNativeComponent } from 'react-native'; +import { View, requireNativeComponent, ViewPropTypes } from 'react-native'; class BlurView extends Component { render() { @@ -16,7 +16,7 @@ class BlurView extends Component { } BlurView.propTypes = { - ...View.propTypes, + ...(ViewPropTypes || View.propTypes), blurType: PropTypes.oneOf(['dark', 'light', 'xlight']), blurAmount: PropTypes.number, };