fix(SW-2928): Added different margins on wellness content wrapper depending on which buttons are present
Approved-by: Christian Andolf Approved-by: Matilda Landström
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import { cx } from "class-variance-authority"
|
||||||
|
|
||||||
import ButtonLink from "@/components/ButtonLink"
|
import ButtonLink from "@/components/ButtonLink"
|
||||||
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
import SidePeek from "@/components/TempDesignSystem/SidePeek"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
@@ -23,14 +25,19 @@ export default async function WellnessAndExerciseSidePeek({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SidePeek contentKey={SidepeekSlugs.wellness} title={heading}>
|
<SidePeek contentKey={SidepeekSlugs.wellness} title={heading}>
|
||||||
<div className={styles.wrapper}>
|
<div
|
||||||
|
className={cx(styles.wrapper, {
|
||||||
|
[styles.hasSpaPage]: spaPage,
|
||||||
|
[styles.hasWellnessExercisePage]: wellnessExercisePageUrl,
|
||||||
|
})}
|
||||||
|
>
|
||||||
{healthFacilities.map((facility) => (
|
{healthFacilities.map((facility) => (
|
||||||
<Facility key={facility.type} data={facility} />
|
<Facility key={facility.type} data={facility} />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{(spaPage || wellnessExercisePageUrl) && (
|
{spaPage || wellnessExercisePageUrl ? (
|
||||||
<div className={styles.buttonContainer}>
|
<div className={styles.buttonContainer}>
|
||||||
{spaPage && (
|
{spaPage ? (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
href={spaPage.url}
|
href={spaPage.url}
|
||||||
variant="Tertiary"
|
variant="Tertiary"
|
||||||
@@ -39,7 +46,7 @@ export default async function WellnessAndExerciseSidePeek({
|
|||||||
>
|
>
|
||||||
{spaPage.buttonCTA}
|
{spaPage.buttonCTA}
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
)}
|
) : null}
|
||||||
{wellnessExercisePageHref ? (
|
{wellnessExercisePageHref ? (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
href={wellnessExercisePageHref}
|
href={wellnessExercisePageHref}
|
||||||
@@ -53,7 +60,7 @@ export default async function WellnessAndExerciseSidePeek({
|
|||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)}
|
) : null}
|
||||||
</SidePeek>
|
</SidePeek>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,16 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--Spacing-x4);
|
gap: var(--Spacing-x4);
|
||||||
margin-bottom: calc(
|
|
||||||
var(--Spacing-x4) * 2 + 80px
|
/* Creates space between the wrapper and buttonContainer depending on which buttons are present */
|
||||||
); /* Creates space between the wrapper and buttonContainer */
|
&.hasSpaPage,
|
||||||
|
&.hasWellnessPage {
|
||||||
|
margin-bottom: 125px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.hasSpaPage.hasWellnessExercisePage {
|
||||||
|
margin-bottom: 201px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttonContainer {
|
.buttonContainer {
|
||||||
|
|||||||
Reference in New Issue
Block a user