Browse Source

fix propstypes bug.

zhai yuanji 6 years ago
parent
commit
b43ad5505f
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      LoadingSpinnerOverlay.js

+ 4
- 3
LoadingSpinnerOverlay.js View File

7
 
7
 
8
 import React, {
8
 import React, {
9
     Component,
9
     Component,
10
-    PropTypes,
11
 } from 'react'
10
 } from 'react'
12
 import {
11
 import {
13
     View,
12
     View,
19
     ActivityIndicator,
18
     ActivityIndicator,
20
     ActivityIndicatorIOS,
19
     ActivityIndicatorIOS,
21
     ProgressBarAndroid,
20
     ProgressBarAndroid,
21
+	ViewPropTypes
22
 } from 'react-native'
22
 } from 'react-native'
23
 
23
 
24
+import PropTypes from 'prop-types';
24
 import TimerEnhance from 'react-native-smart-timer-enhance'
25
 import TimerEnhance from 'react-native-smart-timer-enhance'
25
 
26
 
26
 const styles = StyleSheet.create({
27
 const styles = StyleSheet.create({
52
     }
53
     }
53
 
54
 
54
     static propTypes = {
55
     static propTypes = {
55
-        overlayStyle: View.propTypes.style,
56
-        style: View.propTypes.style,
56
+        overlayStyle: ViewPropTypes.style,
57
+        style: ViewPropTypes.style,
57
         duration: PropTypes.number,
58
         duration: PropTypes.number,
58
         delay: PropTypes.number,
59
         delay: PropTypes.number,
59
         marginTop: PropTypes.number,
60
         marginTop: PropTypes.number,