diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/index.tsx b/components/Loyalty/Blocks/DynamicContent/OverviewTable/index.tsx index dffb7c870..3b768963c 100644 --- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/index.tsx +++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/index.tsx @@ -2,6 +2,7 @@ import { useState } from "react" +import { Lang } from "@/constants/languages" import { _ } from "@/lib/translation" import CheckCircle from "@/components/Icons/CheckCircle" @@ -20,6 +21,63 @@ import { LevelSummaryProps, } from "@/types/components/loyalty/blocks" +// These should ultimately be fetched from Contentstack +const titleTranslations = { + [Lang.en]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], + // TODO: Add translations for the following languages + [Lang.da]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], + [Lang.no]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], + [Lang.sv]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], + [Lang.fi]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], + [Lang.de]: [ + { text: "7 delightful levels", highlight: true }, + { text: "of friendship", highlight: false }, + ], +} + +type TitleTranslation = { + text: string + highlight: boolean +} + +type OverviewTableTitleProps = { texts: TitleTranslation[] } + +function OverviewTableTitle({ texts }: OverviewTableTitleProps) { + return ( +
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
diff --git a/components/Loyalty/Blocks/DynamicContent/OverviewTable/overviewTable.module.css b/components/Loyalty/Blocks/DynamicContent/OverviewTable/overviewTable.module.css
index 27ac0e8cd..d017407b0 100644
--- a/components/Loyalty/Blocks/DynamicContent/OverviewTable/overviewTable.module.css
+++ b/components/Loyalty/Blocks/DynamicContent/OverviewTable/overviewTable.module.css
@@ -1,15 +1,29 @@
.container {
background-color: var(--Main-Brand-PalePeach);
+ left: 50%;
+ margin-top: -1.6rem;
+ margin-left: -50vw;
+ margin-right: -50vw;
+ margin-bottom: -9.3rem; /* Based on the MaxWidth's 1.6rem + the LoyaltyPage's 7.7rem bottom margins */
+ position: relative;
+ right: 50%;
+ width: 100dvw;
+ padding: 1.6rem;
}
.title {
font-family: var(--typography-Title1-Desktop-fontFamily), inherit;
}
+.highlight {
+ color: var(--Base-Text-Primary-Accent);
+}
+
.preamble {
color: var(--Base-Text-Primary-High-contrast);
font-size: var(--typography-Body-Regular-fontSize);
line-height: 150%;
+ margin: 0;
}
.columns {
@@ -76,7 +90,7 @@
position: absolute;
position: absolute;
top: 0;
- bottom: 0;
+ bottom: 1.6rem;
left: 50%;
right: 0;
z-index: 1;
diff --git a/components/Loyalty/Blocks/DynamicContent/dynamicContent.module.css b/components/Loyalty/Blocks/DynamicContent/dynamicContent.module.css
index b1ebc5a58..9cba2379c 100644
--- a/components/Loyalty/Blocks/DynamicContent/dynamicContent.module.css
+++ b/components/Loyalty/Blocks/DynamicContent/dynamicContent.module.css
@@ -1,7 +1,6 @@
.container {
display: grid;
gap: 2.4rem;
- overflow: hidden;
margin-right: -1.6rem;
padding-right: 1.6rem;
}
diff --git a/components/Loyalty/Blocks/DynamicContent/index.tsx b/components/Loyalty/Blocks/DynamicContent/index.tsx
index 3e8db8392..eca1b1123 100644
--- a/components/Loyalty/Blocks/DynamicContent/index.tsx
+++ b/components/Loyalty/Blocks/DynamicContent/index.tsx
@@ -29,39 +29,44 @@ function DynamicComponentBlock({ component }: DynamicComponentProps) {
export default function DynamicContent({
dynamicContent,
}: DynamicContentProps) {
+ const displayHeader = !!(
+ dynamicContent.title ||
+ dynamicContent.subtitle ||
+ dynamicContent.title
+ )
return (