Skip to content

Commit

Permalink
[google] ProviderPropType
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbox committed Sep 21, 2016
1 parent ee57a01 commit 2d37a79
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 18 deletions.
1 change: 1 addition & 0 deletions components/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,7 @@ MapView.Circle = MapCircle;
MapView.UrlTile = MapUrlTile;
MapView.Callout = MapCallout;
Object.assign(MapView, ProviderConstants);
MapView.ProviderPropType = PropTypes.oneOf(Object.values(ProviderConstants));

MapView.Animated = Animated.createAnimatedComponent(MapView);

Expand Down
4 changes: 4 additions & 0 deletions components/ProviderPropType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { PropTypes } from 'react';
import * as ProviderConstants from './ProviderConstants';

export default

This comment has been minimized.

Copy link
@spikebrehm

spikebrehm Sep 21, 2016

unfinished?

This comment has been minimized.

Copy link
@gilbox

gilbox Sep 21, 2016

Author Contributor

oops, changed my mind and forgot to delete it. It's exposed as a one-liner in MapView.js

2 changes: 1 addition & 1 deletion example/examples/AnimatedMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class AnimatedMarkers extends React.Component {
}

AnimatedMarkers.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/AnimatedViews.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class AnimatedViews extends React.Component {
}

AnimatedViews.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/CachedMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class CachedMap extends React.Component {
}

CachedMap.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Callouts.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Callouts extends React.Component {
}

Callouts.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/DefaultMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class DefaultMarkers extends React.Component {
}

DefaultMarkers.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/DisplayLatLng.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class DisplayLatLng extends React.Component {
}

DisplayLatLng.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/DraggableMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class MarkerTypes extends React.Component {
}

MarkerTypes.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/EventListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class EventListener extends React.Component {
}

EventListener.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/FitToSuppliedMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class FocusOnMarkers extends React.Component {
}

FocusOnMarkers.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/LoadingMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LoadingMap extends React.Component {
}

LoadingMap.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/MarkerTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class MarkerTypes extends React.Component {
}

MarkerTypes.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/Overlays.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class Overlays extends React.Component {
}

Overlays.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/PolygonCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class PolygonCreator extends React.Component {
}

PolygonCreator.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/PolylineCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class PolylineCreator extends React.Component {
}

PolylineCreator.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/PriceMarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
const propTypes = {
amount: PropTypes.number.isRequired,
fontSize: PropTypes.number,
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion example/examples/StaticMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class StaticMap extends React.Component {
}

StaticMap.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/TakeSnapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MarkerTypes extends React.Component {
}

MarkerTypes.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down
2 changes: 1 addition & 1 deletion example/examples/ViewsAsMarkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class ViewsAsMarkers extends React.Component {
}

ViewsAsMarkers.propTypes = {
provider: PropTypes.string,
provider: MapView.ProviderPropType,
};

const styles = StyleSheet.create({
Expand Down

0 comments on commit 2d37a79

Please sign in to comment.