style(SW-593): add wrapper
This commit is contained in:
@@ -39,34 +39,35 @@ export default function MobileMapToggle() {
|
||||
}, [handleScroll])
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={mapToggleRef}
|
||||
className={`${styles.mobileToggle} ${isVisible ? "" : styles.hidden}`}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.button} ${!isDynamicMapOpen ? styles.active : ""}`}
|
||||
onClick={closeDynamicMap}
|
||||
<div ref={mapToggleRef} className={styles.wrapper}>
|
||||
<div
|
||||
className={`${styles.mobileToggle} ${isVisible ? "" : styles.hidden}`}
|
||||
>
|
||||
<HouseIcon
|
||||
color={!isDynamicMapOpen ? "white" : "red"}
|
||||
height={24}
|
||||
width={24}
|
||||
/>
|
||||
<span>{intl.formatMessage({ id: "Hotel" })}</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.button} ${isDynamicMapOpen ? styles.active : ""}`}
|
||||
onClick={openDynamicMap}
|
||||
>
|
||||
<MapIcon
|
||||
color={isDynamicMapOpen ? "white" : "red"}
|
||||
height={24}
|
||||
width={24}
|
||||
/>
|
||||
<span>{intl.formatMessage({ id: "Map" })}</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.button} ${!isDynamicMapOpen ? styles.active : ""}`}
|
||||
onClick={closeDynamicMap}
|
||||
>
|
||||
<HouseIcon
|
||||
color={!isDynamicMapOpen ? "white" : "red"}
|
||||
height={24}
|
||||
width={24}
|
||||
/>
|
||||
<span>{intl.formatMessage({ id: "Hotel" })}</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.button} ${isDynamicMapOpen ? styles.active : ""}`}
|
||||
onClick={openDynamicMap}
|
||||
>
|
||||
<MapIcon
|
||||
color={isDynamicMapOpen ? "white" : "red"}
|
||||
height={24}
|
||||
width={24}
|
||||
/>
|
||||
<span>{intl.formatMessage({ id: "Map" })}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
.mobileToggle {
|
||||
.wrapper {
|
||||
margin: 0 auto;
|
||||
position: sticky;
|
||||
bottom: var(--Spacing-x5);
|
||||
margin: 0 auto;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.mobileToggle {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: var(--Spacing-x-half);
|
||||
@@ -41,11 +44,11 @@
|
||||
}
|
||||
|
||||
.hidden {
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1367px) {
|
||||
.mobileToggle {
|
||||
.wrapper {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user