From 9ae23b62549af11fbedc53a5f6c04b197ac0819e Mon Sep 17 00:00:00 2001 From: Gabriel Cardona <2278918+gcardonag@users.noreply.github.com> Date: Tue, 26 Sep 2023 20:17:11 -0400 Subject: [PATCH] Adds updates to SelectedTap modal to address sizing and placement --- src/components/SelectedTap/SelectedTap.css | 5 +- src/components/SelectedTap/SelectedTap.js | 58 +++++++------------ .../SelectedTap/SelectedTap.module.scss | 10 +++- 3 files changed, 31 insertions(+), 42 deletions(-) diff --git a/src/components/SelectedTap/SelectedTap.css b/src/components/SelectedTap/SelectedTap.css index 8d731c73..b45dc019 100644 --- a/src/components/SelectedTap/SelectedTap.css +++ b/src/components/SelectedTap/SelectedTap.css @@ -56,14 +56,13 @@ #tap-info-img-box-desktop { position: relative; width: 100%; - height: 25vw; + max-height: 200px; max-width: 100%; - max-height: var(--info-main-image-height-max); min-width: 100%; - min-height: var(--info-main-image-height-min); padding: 10px 10px 0 10px; } #tap-info-img { + position: relative; width: 100%; height: 100%; max-width: 100%; diff --git a/src/components/SelectedTap/SelectedTap.js b/src/components/SelectedTap/SelectedTap.js index 97bb3c94..d75e6223 100644 --- a/src/components/SelectedTap/SelectedTap.js +++ b/src/components/SelectedTap/SelectedTap.js @@ -17,10 +17,12 @@ import sampleImg from '../images/phlask-tessellation.png'; import sampleImg2x from '../images/phlask-tessellation@2x.png'; import phlaskBlue from '../images/phlaskBlue.png'; import phlaskGreen from '../images/phlaskGreen.png'; +import { ReactComponent as CloseIcon } from '../icons/CloseIcon.svg'; import './SelectedTap.css'; import styles from './SelectedTap.module.scss'; import { Paper, SwipeableDrawer } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; import SelectedTapMobile from '../SelectedTapMobile/SelectedTapMobile'; import { @@ -265,36 +267,31 @@ class SelectedTap extends React.Component { sx={{ position: 'absolute', right: '32px', - top: '50%', - transform: 'translateY(-50%)' + top: '20px', + width: '708px', + height: '700px' }} > {/* Dialog Title */} - -
{ + this.toggleInfoWindow(false); + }} + sx={{ + position: 'absolute', + left: 20, + top: 20, + color: theme => theme.palette.grey[500] + }} + size="large" > - -
{/* Location Name */}
+
{/* Main Image */} -
- -
-
{/* Tap Type Icon */}
@@ -393,7 +380,6 @@ class SelectedTap extends React.Component {
- diff --git a/src/components/SelectedTap/SelectedTap.module.scss b/src/components/SelectedTap/SelectedTap.module.scss index bda9779a..06318ec0 100644 --- a/src/components/SelectedTap/SelectedTap.module.scss +++ b/src/components/SelectedTap/SelectedTap.module.scss @@ -93,13 +93,14 @@ .tapContent { position: relative; + top: 70px; width: 100%; height: 100%; height: fit-content; display: flex; flex-direction: column; max-width: 100%; - overflow-y: auto; + max-height: 200px; } .tapContentExpanded { @@ -154,8 +155,11 @@ } .desktopContainer { position: relative; + top: 20px; + // width: 708px; + // height: 860px; // width: 30%; - // min-width: 400px; + min-width: 400px; // max-height: calc(100vh - 220px); // margin: 16px 0 0 16px; animation-name: info-modal-in-desktop; @@ -165,7 +169,7 @@ transition: 0.6s all ease-in-out; .tapContent { - // max-height: calc(100vh - 220px); + top: 70px; border-radius: 5px; background-color: white; box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);