diff --git a/src/components/Map/Map.css b/src/components/Map/Map.css new file mode 100644 index 00000000..9c670fe9 --- /dev/null +++ b/src/components/Map/Map.css @@ -0,0 +1,4 @@ +.root { + width: 100%; + height: 100%; +} diff --git a/src/components/Map/Map.example.js b/src/components/Map/Map.example.js index 12fa4a07..34819ecc 100644 --- a/src/components/Map/Map.example.js +++ b/src/components/Map/Map.example.js @@ -1,10 +1,11 @@ +import React from 'react'; import Map from './Map'; import { types } from '../../util/sdkLoader'; const { LatLng } = types; export const Empty = { - component: Map, + component: props =>
, props: { center: new LatLng(60.16502999999999, 24.940064399999983), address: 'Sharetribe', diff --git a/src/components/Map/Map.js b/src/components/Map/Map.js index f09ccce0..906042d5 100644 --- a/src/components/Map/Map.js +++ b/src/components/Map/Map.js @@ -1,6 +1,8 @@ import React, { Component, PropTypes } from 'react'; import * as propTypes from '../../util/propTypes'; +import css from './Map.css'; + class Map extends Component { componentDidMount() { const mapsLibLoaded = window.google && window.google.maps; @@ -25,12 +27,10 @@ class Map extends Component { }); } render() { - const { className, width, height } = this.props; - const style = { width, height }; + const { className } = this.props; return (