mirror of
https://github.com/status-im/react-native-blur.git
synced 2025-01-11 17:14:11 +00:00
Merge pull request #202 from nfcampos/view-prop-types
Fix deprecation warning of accessing View.propTypes
This commit is contained in:
commit
96c8afeb55
@ -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']),
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user