Skip to content

Instantly share code, notes, and snippets.

@MicheleBertoli
Last active September 15, 2015 19:39
Show Gist options
  • Select an option

  • Save MicheleBertoli/5d52ef31573cfe11c8c8 to your computer and use it in GitHub Desktop.

Select an option

Save MicheleBertoli/5d52ef31573cfe11c8c8 to your computer and use it in GitHub Desktop.
Gmaps InfoWindow Style
import React from 'react';
import {Gmaps, InfoWindow} from 'react-gmaps';
const coords = {
lat: 51.5258541,
lng: -0.08040660000006028
};
const App = React.createClass({
render() {
return (
<div>
<Gmaps
width={'400px'}
height={'300px'}
lat={coords.lat}
lng={coords.lng}
zoom={12}>
<InfoWindow
lat={coords.lat}
lng={coords.lng}
content={'<div class="info-window">I\'m red</div>'} />
</Gmaps>
</div>
);
}
});
React.render(<App />, document.getElementById('gmaps'));
.info-window {
background-color: red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment