Skip to content

Commit

Permalink
Merge pull request #2217 from luggit/fix-color-prop-types
Browse files Browse the repository at this point in the history
Fix color prop types
  • Loading branch information
alvelig committed May 1, 2018
2 parents e53e3cd + bf915b3 commit 16d373f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions lib/components/MapCircle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
ColorPropType,
ViewPropTypes,
View,
} from 'react-native';
Expand Down Expand Up @@ -44,12 +45,12 @@ const propTypes = {
/**
* The stroke color to use for the path.
*/
strokeColor: PropTypes.string,
strokeColor: ColorPropType,

/**
* The fill color to use for the path.
*/
fillColor: PropTypes.string,
fillColor: ColorPropType,

/**
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
Expand Down
3 changes: 2 additions & 1 deletion lib/components/MapMarker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
ColorPropType,
StyleSheet,
Platform,
NativeModules,
Expand Down Expand Up @@ -62,7 +63,7 @@ const propTypes = {
* If no custom marker view or custom image is provided, the platform default pin will be used,
* which can be customized by this color. Ignored if a custom marker is being used.
*/
pinColor: PropTypes.string,
pinColor: ColorPropType,

/**
* The coordinate for the marker.
Expand Down
5 changes: 3 additions & 2 deletions lib/components/MapPolygon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
ColorPropType,
ViewPropTypes,
View,
} from 'react-native';
Expand Down Expand Up @@ -56,12 +57,12 @@ const propTypes = {
/**
* The stroke color to use for the path.
*/
strokeColor: PropTypes.string,
strokeColor: ColorPropType,

/**
* The fill color to use for the path.
*/
fillColor: PropTypes.string,
fillColor: ColorPropType,

/**
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
Expand Down
7 changes: 4 additions & 3 deletions lib/components/MapPolyline.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import {
ColorPropType,
ViewPropTypes,
View,
} from 'react-native';
Expand Down Expand Up @@ -39,7 +40,7 @@ const propTypes = {
/**
* The fill color to use for the path.
*/
fillColor: PropTypes.string,
fillColor: ColorPropType,

/**
* The stroke width to use for the path.
Expand All @@ -49,12 +50,12 @@ const propTypes = {
/**
* The stroke color to use for the path.
*/
strokeColor: PropTypes.string,
strokeColor: ColorPropType,

/**
* The stroke colors to use for the path.
*/
strokeColors: PropTypes.arrayOf(PropTypes.string),
strokeColors: PropTypes.arrayOf(ColorPropType),

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

0 comments on commit 16d373f

Please sign in to comment.