From a6e6b37675a59d5baad38af5bddcecf8afcee076 Mon Sep 17 00:00:00 2001 From: cybice Date: Tue, 2 Feb 2016 19:16:11 +0300 Subject: [PATCH] Move style prop to props, (fast hack to support flex layouts) --- src/google_map.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/google_map.js b/src/google_map.js index 34f217e..e9f8409 100644 --- a/src/google_map.js +++ b/src/google_map.js @@ -56,14 +56,6 @@ function defaultOptions_(/* maps */) { }; } -const style = { - width: '100%', - height: '100%', - margin: 0, - padding: 0, - position: 'relative', -}; - const latLng2Obj = (latLng) => isPlainObject(latLng) ? latLng : {lat: latLng[0], lng: latLng[1]}; @@ -110,6 +102,7 @@ export default class GoogleMap extends Component { onGoogleApiLoaded: PropTypes.func, yesIWantToUseGoogleMapApiInternals: PropTypes.bool, draggable: PropTypes.bool, + style: PropTypes.any, }; static defaultProps = { @@ -123,6 +116,13 @@ export default class GoogleMap extends Component { options: defaultOptions_, googleMapLoader, yesIWantToUseGoogleMapApiInternals: false, + style: { + width: '100%', + height: '100%', + margin: 0, + padding: 0, + position: 'relative', + }, }; static googleMapLoader = googleMapLoader; // eslint-disable-line @@ -869,7 +869,7 @@ export default class GoogleMap extends Component { return (