File tree Expand file tree Collapse file tree 7 files changed +31
-7
lines changed
Expand file tree Collapse file tree 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';
33import {
44 StyleSheet ,
55 ViewPropTypes ,
6+ View ,
67} from 'react-native' ;
78import decorateMapComponent , {
89 SUPPORTED ,
910 USES_DEFAULT_IMPLEMENTATION ,
1011} from './decorateMapComponent' ;
1112
13+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
14+ const viewPropTypes = ViewPropTypes || View . propTypes ;
15+
1216const propTypes = {
13- ...ViewPropTypes ,
17+ ...viewPropTypes ,
1418 tooltip : PropTypes . bool ,
1519 onPress : PropTypes . func ,
1620} ;
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import PropTypes from 'prop-types';
22import React from 'react' ;
33import {
44 ViewPropTypes ,
5+ View ,
56} from 'react-native' ;
67import decorateMapComponent , {
78 USES_DEFAULT_IMPLEMENTATION ,
89 SUPPORTED ,
910} from './decorateMapComponent' ;
1011
12+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14+
1115const propTypes = {
12- ...ViewPropTypes ,
16+ ...viewPropTypes ,
1317
1418 /**
1519 * The coordinate of the center of the circle
Original file line number Diff line number Diff line change 77 Animated ,
88 findNodeHandle ,
99 ViewPropTypes ,
10+ View ,
1011} from 'react-native' ;
1112
1213import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource' ;
@@ -22,8 +23,11 @@ const viewConfig = {
2223 } ,
2324} ;
2425
26+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
27+ const viewPropTypes = ViewPropTypes || View . propTypes ;
28+
2529const propTypes = {
26- ...ViewPropTypes ,
30+ ...viewPropTypes ,
2731
2832 // TODO(lmr): get rid of these?
2933 identifier : PropTypes . string ,
Original file line number Diff line number Diff line change @@ -2,14 +2,18 @@ import PropTypes from 'prop-types';
22import React from 'react' ;
33import {
44 ViewPropTypes ,
5+ View ,
56} from 'react-native' ;
67import decorateMapComponent , {
78 USES_DEFAULT_IMPLEMENTATION ,
89 SUPPORTED ,
910} from './decorateMapComponent' ;
1011
12+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14+
1115const propTypes = {
12- ...ViewPropTypes ,
16+ ...viewPropTypes ,
1317
1418 /**
1519 * 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';
22import React from 'react' ;
33import {
44 ViewPropTypes ,
5+ View ,
56} from 'react-native' ;
67import decorateMapComponent , {
78 USES_DEFAULT_IMPLEMENTATION ,
89 SUPPORTED ,
910} from './decorateMapComponent' ;
1011
12+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
13+ const viewPropTypes = ViewPropTypes || View . propTypes ;
14+
1115const propTypes = {
12- ...ViewPropTypes ,
16+ ...viewPropTypes ,
1317
1418 /**
1519 * 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';
33
44import {
55 ViewPropTypes ,
6+ View ,
67} from 'react-native' ;
78
89import decorateMapComponent , {
910 USES_DEFAULT_IMPLEMENTATION ,
1011 SUPPORTED ,
1112} from './decorateMapComponent' ;
1213
14+ // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
15+ const viewPropTypes = ViewPropTypes || View . propTypes ;
16+
1317const propTypes = {
14- ...ViewPropTypes ,
18+ ...viewPropTypes ,
1519
1620 /**
1721 * 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 88 NativeModules ,
99 ColorPropType ,
1010 findNodeHandle ,
11- View ,
1211 ViewPropTypes ,
12+ View ,
1313} from 'react-native' ;
1414import MapMarker from './MapMarker' ;
1515import MapPolyline from './MapPolyline' ;
You can’t perform that action at this time.
0 commit comments