Skip to content

Commit 16d373f

Browse files
authored
Merge pull request #2217 from luggit/fix-color-prop-types
Fix color prop types
2 parents e53e3cd + bf915b3 commit 16d373f

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

lib/components/MapCircle.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33
import {
4+
ColorPropType,
45
ViewPropTypes,
56
View,
67
} from 'react-native';
@@ -44,12 +45,12 @@ const propTypes = {
4445
/**
4546
* The stroke color to use for the path.
4647
*/
47-
strokeColor: PropTypes.string,
48+
strokeColor: ColorPropType,
4849

4950
/**
5051
* The fill color to use for the path.
5152
*/
52-
fillColor: PropTypes.string,
53+
fillColor: ColorPropType,
5354

5455
/**
5556
* The order in which this tile overlay is drawn with respect to other overlays. An overlay

lib/components/MapMarker.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33
import {
4+
ColorPropType,
45
StyleSheet,
56
Platform,
67
NativeModules,
@@ -62,7 +63,7 @@ const propTypes = {
6263
* If no custom marker view or custom image is provided, the platform default pin will be used,
6364
* which can be customized by this color. Ignored if a custom marker is being used.
6465
*/
65-
pinColor: PropTypes.string,
66+
pinColor: ColorPropType,
6667

6768
/**
6869
* The coordinate for the marker.

lib/components/MapPolygon.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33
import {
4+
ColorPropType,
45
ViewPropTypes,
56
View,
67
} from 'react-native';
@@ -56,12 +57,12 @@ const propTypes = {
5657
/**
5758
* The stroke color to use for the path.
5859
*/
59-
strokeColor: PropTypes.string,
60+
strokeColor: ColorPropType,
6061

6162
/**
6263
* The fill color to use for the path.
6364
*/
64-
fillColor: PropTypes.string,
65+
fillColor: ColorPropType,
6566

6667
/**
6768
* The order in which this tile overlay is drawn with respect to other overlays. An overlay

lib/components/MapPolyline.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import PropTypes from 'prop-types';
22
import React from 'react';
33
import {
4+
ColorPropType,
45
ViewPropTypes,
56
View,
67
} from 'react-native';
@@ -39,7 +40,7 @@ const propTypes = {
3940
/**
4041
* The fill color to use for the path.
4142
*/
42-
fillColor: PropTypes.string,
43+
fillColor: ColorPropType,
4344

4445
/**
4546
* The stroke width to use for the path.
@@ -49,12 +50,12 @@ const propTypes = {
4950
/**
5051
* The stroke color to use for the path.
5152
*/
52-
strokeColor: PropTypes.string,
53+
strokeColor: ColorPropType,
5354

5455
/**
5556
* The stroke colors to use for the path.
5657
*/
57-
strokeColors: PropTypes.arrayOf(PropTypes.string),
58+
strokeColors: PropTypes.arrayOf(ColorPropType),
5859

5960
/**
6061
* The order in which this tile overlay is drawn with respect to other overlays. An overlay

0 commit comments

Comments
 (0)