style(SW-593): add wrapper

This commit is contained in:
Fredrik Thorsson
2024-10-16 10:20:55 +02:00
parent d8a9374345
commit 4c44b312a6
2 changed files with 35 additions and 31 deletions

View File

@@ -39,8 +39,8 @@ export default function MobileMapToggle() {
}, [handleScroll]) }, [handleScroll])
return ( return (
<div ref={mapToggleRef} className={styles.wrapper}>
<div <div
ref={mapToggleRef}
className={`${styles.mobileToggle} ${isVisible ? "" : styles.hidden}`} className={`${styles.mobileToggle} ${isVisible ? "" : styles.hidden}`}
> >
<button <button
@@ -68,5 +68,6 @@ export default function MobileMapToggle() {
<span>{intl.formatMessage({ id: "Map" })}</span> <span>{intl.formatMessage({ id: "Map" })}</span>
</button> </button>
</div> </div>
</div>
) )
} }

View File

@@ -1,8 +1,11 @@
.mobileToggle { .wrapper {
margin: 0 auto;
position: sticky; position: sticky;
bottom: var(--Spacing-x5); bottom: var(--Spacing-x5);
margin: 0 auto;
z-index: 1; z-index: 1;
}
.mobileToggle {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: var(--Spacing-x-half); gap: var(--Spacing-x-half);
@@ -41,11 +44,11 @@
} }
.hidden { .hidden {
visibility: hidden; display: none;
} }
@media screen and (min-width: 1367px) { @media screen and (min-width: 1367px) {
.mobileToggle { .wrapper {
display: none; display: none;
} }
} }