File tree 7 files changed +31
-7
lines changed
7 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,18 @@ import React from 'react';
3
3
import {
4
4
StyleSheet ,
5
5
ViewPropTypes ,
6
+ View ,
6
7
} from 'react-native' ;
7
8
import decorateMapComponent , {
8
9
SUPPORTED ,
9
10
USES_DEFAULT_IMPLEMENTATION ,
10
11
} from './decorateMapComponent' ;
11
12
13
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
14
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
15
+
12
16
const propTypes = {
13
- ...ViewPropTypes ,
17
+ ...viewPropTypes ,
14
18
tooltip : PropTypes . bool ,
15
19
onPress : PropTypes . func ,
16
20
} ;
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import PropTypes from 'prop-types';
2
2
import React from 'react' ;
3
3
import {
4
4
ViewPropTypes ,
5
+ View ,
5
6
} from 'react-native' ;
6
7
import decorateMapComponent , {
7
8
USES_DEFAULT_IMPLEMENTATION ,
8
9
SUPPORTED ,
9
10
} from './decorateMapComponent' ;
10
11
12
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14
+
11
15
const propTypes = {
12
- ...ViewPropTypes ,
16
+ ...viewPropTypes ,
13
17
14
18
/**
15
19
* The coordinate of the center of the circle
Original file line number Diff line number Diff line change 7
7
Animated ,
8
8
findNodeHandle ,
9
9
ViewPropTypes ,
10
+ View ,
10
11
} from 'react-native' ;
11
12
12
13
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource' ;
@@ -22,8 +23,11 @@ const viewConfig = {
22
23
} ,
23
24
} ;
24
25
26
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
27
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
28
+
25
29
const propTypes = {
26
- ...ViewPropTypes ,
30
+ ...viewPropTypes ,
27
31
28
32
// TODO(lmr): get rid of these?
29
33
identifier : PropTypes . string ,
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import PropTypes from 'prop-types';
2
2
import React from 'react' ;
3
3
import {
4
4
ViewPropTypes ,
5
+ View ,
5
6
} from 'react-native' ;
6
7
import decorateMapComponent , {
7
8
USES_DEFAULT_IMPLEMENTATION ,
8
9
SUPPORTED ,
9
10
} from './decorateMapComponent' ;
10
11
12
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14
+
11
15
const propTypes = {
12
- ...ViewPropTypes ,
16
+ ...viewPropTypes ,
13
17
14
18
/**
15
19
* An array of coordinates to describe the polygon
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import PropTypes from 'prop-types';
2
2
import React from 'react' ;
3
3
import {
4
4
ViewPropTypes ,
5
+ View ,
5
6
} from 'react-native' ;
6
7
import decorateMapComponent , {
7
8
USES_DEFAULT_IMPLEMENTATION ,
8
9
SUPPORTED ,
9
10
} from './decorateMapComponent' ;
10
11
12
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14
+
11
15
const propTypes = {
12
- ...ViewPropTypes ,
16
+ ...viewPropTypes ,
13
17
14
18
/**
15
19
* An array of coordinates to describe the polygon
Original file line number Diff line number Diff line change @@ -3,15 +3,19 @@ import React from 'react';
3
3
4
4
import {
5
5
ViewPropTypes ,
6
+ View ,
6
7
} from 'react-native' ;
7
8
8
9
import decorateMapComponent , {
9
10
USES_DEFAULT_IMPLEMENTATION ,
10
11
SUPPORTED ,
11
12
} from './decorateMapComponent' ;
12
13
14
+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
15
+ const viewPropTypes = ViewPropTypes || View . propTypes ;
16
+
13
17
const propTypes = {
14
- ...ViewPropTypes ,
18
+ ...viewPropTypes ,
15
19
16
20
/**
17
21
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
Original file line number Diff line number Diff line change 8
8
NativeModules ,
9
9
ColorPropType ,
10
10
findNodeHandle ,
11
- View ,
12
11
ViewPropTypes ,
12
+ View ,
13
13
} from 'react-native' ;
14
14
import MapMarker from './MapMarker' ;
15
15
import MapPolyline from './MapPolyline' ;
You can’t perform that action at this time.
0 commit comments