Merge pull request #202 from nfcampos/view-prop-types

Fix deprecation warning of accessing View.propTypes
This commit is contained in:
Alexey 2017-05-23 22:16:13 -04:00 committed by GitHub
commit 96c8afeb55
2 changed files with 4 additions and 4 deletions

View File

@ -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']),

View File

@ -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,
};