diff --git a/src/components/MapPanel/MapPanel.css b/src/components/MapPanel/MapPanel.css new file mode 100644 index 00000000..3ff8f8e6 --- /dev/null +++ b/src/components/MapPanel/MapPanel.css @@ -0,0 +1,53 @@ +.mapContainer { + height: 70vh; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + background-color: #ddd; + color: #fff; + font-size: 2rem; +} +.mapListingsContainer { + height: 30vh; + width: 100%; + background-color: #fff; + display: flex; + flex-direction: row; + padding: 1rem; +} + + +.toFiltersButton { + position: fixed; + top: calc(70vh - 80px); + left: 50%; + width: 200px; + margin-left: -100px; + display: block; + text-align: center; + text-decoration: none; + font-size: 1.4rem; + padding: 0.5rem; + color: #fff; + background-color: #9B9B9B; + cursor: pointer; + + &:hover { + background-color: #888; + } +} + +.close { + position: absolute; + top: 0; + left: 0; + height: 3em; + padding: 1em; + color: #999; + text-decoration: none; + + &:hover { + color: #000; + } +} diff --git a/src/components/MapPanel/MapPanel.js b/src/components/MapPanel/MapPanel.js new file mode 100644 index 00000000..a0383b4d --- /dev/null +++ b/src/components/MapPanel/MapPanel.js @@ -0,0 +1,22 @@ +import React, { PropTypes } from 'react'; +import { NamedLink } from '../../components'; +import css from './MapPanel.css'; + +const MapPanel = props => ( +
+
Map
+
+ {props.children} +
+ Filters + X +
+); + +MapPanel.defaultProps = { children: null }; + +const { any } = PropTypes; + +MapPanel.propTypes = { children: any }; + +export default MapPanel; diff --git a/src/components/MapPanel/MapPanel.test.js b/src/components/MapPanel/MapPanel.test.js new file mode 100644 index 00000000..562860b6 --- /dev/null +++ b/src/components/MapPanel/MapPanel.test.js @@ -0,0 +1,22 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import { TestProvider } from '../../util/test-helpers'; +import { RoutesProvider } from '../../components'; +import routesConfiguration from '../../routesConfiguration'; +import MapPanel from './MapPanel'; + +describe('MapPanel', () => { + it('matches snapshot', () => { + const component = renderer.create( + ( + + + + + + ), + ); + const tree = component.toJSON(); + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/src/components/MapPanel/__snapshots__/MapPanel.test.js.snap b/src/components/MapPanel/__snapshots__/MapPanel.test.js.snap new file mode 100644 index 00000000..8b5b9f82 --- /dev/null +++ b/src/components/MapPanel/__snapshots__/MapPanel.test.js.snap @@ -0,0 +1,24 @@ +exports[`MapPanel matches snapshot 1`] = ` +
+
+ Map +
+
+ + Filters + + + X + +
+`;