Commit 33fd49b1 authored by Andrew Hrdy's avatar Andrew Hrdy

Map dialog is fullscreen on mobile. Added close button to dialog.

Closes #17.
parent 09a3da6e
Pipeline #2191 passed with stage
in 1 minute and 45 seconds
......@@ -81,6 +81,7 @@ class FacilityDialog extends React.Component {
open={isMapOpen}
facilities={facilities}
facility={facility}
fullScreen={true}
campusRegion={facility.facility_location.campus_region}
onClose={this.toggleMap}
/>
......
......@@ -2,6 +2,8 @@ import React from 'react';
import PropTypes from 'prop-types';
import Dialog from 'material-ui/Dialog';
import FacilitiesMap from './FacilitiesMap';
import IconButton from 'material-ui/IconButton';
import CloseIcon from 'material-ui-icons/Close';
class MapDialog extends React.Component {
handleRequestClose = () => {
......@@ -9,14 +11,18 @@ class MapDialog extends React.Component {
};
render() {
const {facility, facilities, campusRegion, open} = this.props;
const {facility, facilities, campusRegion, open, width, height, fullScreen = false} = this.props;
return (
<Dialog onClose={this.handleRequestClose} open={open}>
<Dialog onClose={this.handleRequestClose} open={open} fullScreen={fullScreen}>
<div style={{
height: '500px',
width: '600px'
height: height || '100%',
width: width || '100%'
}}>
<IconButton className={'map-dialog-close-btn'} onClick={this.handleRequestClose}>
<CloseIcon />
</IconButton>
<FacilitiesMap
facilities={facilities}
facility={facility}
......
.map-dialog-close-btn {
position: absolute !important;
z-index: 100;
top: 10px;
left: 10px;
width: 30px !important;
height: 30px !important;
background-color: white !important;
border-radius: 5px !important;
}
\ No newline at end of file
......@@ -9,6 +9,7 @@
@import './components/facilityStatus';
@import './components/facilityLabels';
@import './components/favoriteButton';
@import './components/mapDialog';
@import './components/sidebar';
@import './components/textwTitle';
@import './components/weekHours';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment