feat(SW-344): Hotel list in mobile

This commit is contained in:
Pontus Dreij
2024-11-12 09:19:11 +01:00
parent 169751c5a6
commit b73421dbde
10 changed files with 146 additions and 47 deletions

View File

@@ -8,6 +8,10 @@
min-width: 109px !important; /* Overwriting the default width of the @vis.gl/react-google-maps AdvancedMarker */
}
.dialogContainer {
display: none;
}
.pin {
position: absolute;
top: 0;
@@ -67,3 +71,9 @@
.card.active {
display: block;
}
@media (min-width: 768px) {
.dialogContainer {
display: block;
}
}

View File

@@ -50,17 +50,18 @@ export default function HotelListingMapContent({
)
}
>
<HotelCardDialog
isOpen={isActiveOrHovered}
handleClose={(event: { stopPropagation: () => void }) => {
event.stopPropagation()
if (activeHotelPin === pin.name) {
toggleActiveHotelPin(null)
}
}}
pin={pin}
/>
<div className={styles.dialogContainer}>
<HotelCardDialog
isOpen={isActiveOrHovered}
handleClose={(event: { stopPropagation: () => void }) => {
event.stopPropagation()
if (activeHotelPin === pin.name) {
toggleActiveHotelPin(null)
}
}}
data={pin}
/>
</div>
<span
className={`${styles.pin} ${isActiveOrHovered ? styles.active : ""}`}
>