Skip to content

Commit

Permalink
legend component setup >relates #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Dupree committed Oct 18, 2018
1 parent a3df2d7 commit 804b60f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const ModalOverlay = styled.div.attrs({
className: "vh-100 w-100 fixed top-0 left-0 z-9999 o-70 bg-white"
})``;


class App extends Component {
state = {
markers: false,
Expand Down Expand Up @@ -150,8 +151,11 @@ class App extends Component {
/>
)}
</FullScreenContainer>

{loaded && markers && !center && <ModalOverlay />}
{loaded && markers && !center && modal}


</React.Fragment>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const HeaderLink = styled.a.attrs({
className: 'f6 mr1',
})``;



export default props => (
<MyHeader>
<HeaderLink href="/">
Expand Down
11 changes: 11 additions & 0 deletions src/components/Legend.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import styled from 'styled-components';


const LegendUseclass = styled.h1.attrs({
className: "near-black vh-100 w-100 fixed top-0 left-0 z-max flex items-center justify-center"
})``;

export default props => (
<LegendUseclass>Hello</LegendUseclass>
)
2 changes: 2 additions & 0 deletions src/components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import ReactDOMServer from "react-dom/server";
import { Map, Marker, Popup, TileLayer, Tooltip } from "react-leaflet";
import MarkerClusterGroup from "react-leaflet-markercluster";
import MapLegend from "./Legend"
import Icon from "./MarkerIcon";
import L from "leaflet";
import styled from "styled-components";
Expand Down Expand Up @@ -221,6 +222,7 @@ export default props => {
>
<Markers markers={props.markers} />
</MarkerClusterGroup>
<MapLegend>Hello</MapLegend>
</Map>
);
};

0 comments on commit 804b60f

Please sign in to comment.