Merged in feat/SW-392-hotel-page-tracking-additions (pull request #1251)
feat(SW-392): Added tracking when clicking mobile map button * feat(SW-392): Added tracking when clicking mobile map button * fix: button padding and margin inside map sidebar on mobile Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -96,6 +96,7 @@ export default function Sidebar({
|
|||||||
<Button
|
<Button
|
||||||
theme="base"
|
theme="base"
|
||||||
intent="text"
|
intent="text"
|
||||||
|
wrapping
|
||||||
fullWidth
|
fullWidth
|
||||||
className={styles.sidebarToggle}
|
className={styles.sidebarToggle}
|
||||||
onClick={toggleFullScreenSidebar}
|
onClick={toggleFullScreenSidebar}
|
||||||
|
|||||||
@@ -84,12 +84,13 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarToggle {
|
button.sidebarToggle {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: var(--Spacing-x4);
|
margin-top: var(--Spacing-x4);
|
||||||
|
padding: var(--Spacing-x2) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebarToggle::before {
|
button.sidebarToggle::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: block;
|
display: block;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useIntl } from "react-intl"
|
|||||||
import useHotelPageStore from "@/stores/hotel-page"
|
import useHotelPageStore from "@/stores/hotel-page"
|
||||||
|
|
||||||
import { HouseIcon, MapIcon } from "@/components/Icons"
|
import { HouseIcon, MapIcon } from "@/components/Icons"
|
||||||
|
import { trackHotelMapClick } from "@/utils/tracking"
|
||||||
|
|
||||||
import styles from "./mobileToggle.module.css"
|
import styles from "./mobileToggle.module.css"
|
||||||
|
|
||||||
@@ -12,6 +13,11 @@ export default function MobileMapToggle() {
|
|||||||
const { isDynamicMapOpen, openDynamicMap, closeDynamicMap } =
|
const { isDynamicMapOpen, openDynamicMap, closeDynamicMap } =
|
||||||
useHotelPageStore()
|
useHotelPageStore()
|
||||||
|
|
||||||
|
function handleOpenMapClick() {
|
||||||
|
openDynamicMap()
|
||||||
|
trackHotelMapClick()
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.mobileToggle}>
|
<div className={styles.mobileToggle}>
|
||||||
<button
|
<button
|
||||||
@@ -29,7 +35,7 @@ export default function MobileMapToggle() {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className={`${styles.button} ${isDynamicMapOpen ? styles.active : ""}`}
|
className={`${styles.button} ${isDynamicMapOpen ? styles.active : ""}`}
|
||||||
onClick={openDynamicMap}
|
onClick={handleOpenMapClick}
|
||||||
>
|
>
|
||||||
<MapIcon
|
<MapIcon
|
||||||
color={isDynamicMapOpen ? "white" : "red"}
|
color={isDynamicMapOpen ? "white" : "red"}
|
||||||
|
|||||||
Reference in New Issue
Block a user