Create reception page
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
import React from 'react';
|
||||
import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps';
|
||||
|
||||
class CeremonyMap extends React.Component {
|
||||
render() {
|
||||
const CeremonyGoogleMap = withGoogleMap(() => (
|
||||
<GoogleMap
|
||||
defaultZoom={14}
|
||||
defaultCenter={{ lat: 51.7109, lng: -0.4479 }}
|
||||
>
|
||||
<Marker
|
||||
title="All Saints' Church"
|
||||
position={{ lat: 51.7109, lng: -0.4479 }}
|
||||
key="0"
|
||||
/>
|
||||
</GoogleMap>
|
||||
));
|
||||
return (
|
||||
<CeremonyGoogleMap
|
||||
containerElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
}
|
||||
mapElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CeremonyMap;
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"name": "CeremonyMap",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "./CeremonyMap.js"
|
||||
}
|
||||
44
src/components/Map/Map.js
Normal file
44
src/components/Map/Map.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import React, { PropTypes } from 'react';
|
||||
import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps';
|
||||
|
||||
class Map extends React.Component {
|
||||
static propTypes = {
|
||||
defaultZoom: PropTypes.number.isRequired,
|
||||
lat: PropTypes.number.isRequired,
|
||||
lng: PropTypes.number.isRequired,
|
||||
markers: PropTypes.arrayOf(PropTypes.shape({
|
||||
title: PropTypes.string.isRequired,
|
||||
lat: PropTypes.number.isRequired,
|
||||
lng: PropTypes.number.isRequired,
|
||||
})).isRequired,
|
||||
};
|
||||
|
||||
render() {
|
||||
const CeremonyGoogleMap = withGoogleMap(() => (
|
||||
<GoogleMap
|
||||
defaultZoom={this.props.defaultZoom}
|
||||
defaultCenter={{ lat: this.props.lat, lng: this.props.lng }}
|
||||
>
|
||||
{this.props.markers.map((props, index) => (
|
||||
<Marker
|
||||
title={props.title}
|
||||
position={{ lat: props.lat, lng: props.lng }}
|
||||
key={index}
|
||||
/>
|
||||
))}
|
||||
</GoogleMap>
|
||||
));
|
||||
return (
|
||||
<CeremonyGoogleMap
|
||||
containerElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
}
|
||||
mapElement={
|
||||
<div style={{ height: '360px', width: '360px' }} />
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Map;
|
||||
6
src/components/Map/package.json
Normal file
6
src/components/Map/package.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Map",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"main": "./Map.js"
|
||||
}
|
||||
@@ -16,6 +16,7 @@ class Navigation extends React.Component {
|
||||
<div className={s.root} role="navigation">
|
||||
<Link className={[s.link, this.props.current === 'home' ? s.active : null].join(' ')} to="/">RSVP</Link>
|
||||
<Link className={[s.link, this.props.current === 'ceremony' ? s.active : null].join(' ')} to="/ceremony">Church</Link>
|
||||
<Link className={[s.link, this.props.current === 'reception' ? s.active : null].join(' ')} to="/reception">Venue</Link>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user