Skip to content

Commit

Permalink
fix(PropTypes): Fix component PropTypes definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed May 21, 2020
1 parent 584f9cd commit be55953
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/base-map/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ BaseMap.propTypes = {
// Ideally, the types below should be MapLayer,
// however, during type validation in the browser,
// MapLayer components all seem to resolve to Object.
PropTypes.object,
PropTypes.arrayOf(PropTypes.object)
PropTypes.node,
PropTypes.arrayOf(PropTypes.node)
]),
/**
* The base (background) layers for the map.
Expand Down
12 changes: 9 additions & 3 deletions packages/core-utils/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,10 @@ export const queryType = PropTypes.shape({
startTime: PropTypes.string,
endTime: PropTypes.string,
mode: PropTypes.string,
showIntermediateStops: PropTypes.bool,
showIntermediateStops: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string
]),
maxWalkDistance: PropTypes.number,
maxBikeDistance: PropTypes.number,
optimize: PropTypes.string,
Expand All @@ -522,9 +525,12 @@ export const queryType = PropTypes.shape({
bikeSpeed: PropTypes.number,
maxEScooterDistance: PropTypes.number,
watts: PropTypes.number,
ignoreRealtimeUpdates: PropTypes.bool,
ignoreRealtimeUpdates: PropTypes.oneOfType([
PropTypes.bool,
PropTypes.string
]),
companies: PropTypes.string,
wheelchair: PropTypes.bool
wheelchair: PropTypes.oneOfType([PropTypes.bool, PropTypes.string])
});

export const configuredModeType = PropTypes.oneOfType([
Expand Down

0 comments on commit be55953

Please sign in to comment.