fix(SW-438): add ContentCard, ScriptedCard and Shortcuts to ContentPage sidebar
This commit is contained in:
@@ -45,10 +45,8 @@ export default function CardsGrid({
|
||||
theme={cards_grid.theme ?? "one"}
|
||||
key={card.system.uid}
|
||||
scriptedTopTitle={card.scripted_top_title}
|
||||
heading={card.heading}
|
||||
bodyText={card.body_text}
|
||||
secondaryButton={card.secondaryButton}
|
||||
primaryButton={card.primaryButton}
|
||||
{...card}
|
||||
/>
|
||||
)
|
||||
case CardsGridEnum.cards.TeaserCard:
|
||||
@@ -57,21 +55,15 @@ export default function CardsGrid({
|
||||
key={card.system.uid}
|
||||
title={card.heading}
|
||||
description={card.body_text}
|
||||
primaryButton={card.primaryButton}
|
||||
secondaryButton={card.secondaryButton}
|
||||
sidePeekButton={card.sidePeekButton}
|
||||
sidePeekContent={card.sidePeekContent}
|
||||
image={card.image}
|
||||
{...card}
|
||||
/>
|
||||
)
|
||||
case CardsGridEnum.cards.LoyaltyCard:
|
||||
return (
|
||||
<LoyaltyCard
|
||||
key={card.system.uid}
|
||||
image={card.image}
|
||||
heading={card.heading}
|
||||
bodyText={card.body_text}
|
||||
link={card.link}
|
||||
{...card}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
|
||||
import ShortcutsList from "../Blocks/ShortcutsList"
|
||||
import Card from "../TempDesignSystem/Card"
|
||||
import TeaserCard from "../TempDesignSystem/TeaserCard"
|
||||
import JoinLoyaltyContact from "./JoinLoyalty"
|
||||
import MyPagesNavigation from "./MyPagesNavigation"
|
||||
|
||||
@@ -26,6 +29,19 @@ export default function Sidebar({ blocks }: SidebarProps) {
|
||||
/>
|
||||
</section>
|
||||
)
|
||||
case SidebarEnums.blocks.ContentCard:
|
||||
console.log("EEE", block.content_card)
|
||||
return (
|
||||
<TeaserCard
|
||||
{...block.content_card}
|
||||
title={block.content_card.heading}
|
||||
description={block.content_card.body_text}
|
||||
style={
|
||||
block.content_card.theme === "gray" ? "default" : "featured"
|
||||
}
|
||||
/>
|
||||
)
|
||||
|
||||
case SidebarEnums.blocks.DynamicContent:
|
||||
switch (block.dynamic_content.component) {
|
||||
case DynamicContentEnum.Sidebar.components.my_pages_navigation:
|
||||
@@ -40,6 +56,20 @@ export default function Sidebar({ blocks }: SidebarProps) {
|
||||
key={`${block.typename}-${idx}`}
|
||||
/>
|
||||
)
|
||||
case SidebarEnums.blocks.ScriptedCard:
|
||||
return (
|
||||
<Card
|
||||
{...block.scripted_card}
|
||||
bodyText={block.scripted_card.body_text}
|
||||
scriptedTopTitle={block.scripted_card.scripted_top_title}
|
||||
theme={block.scripted_card.theme ?? "image"}
|
||||
/>
|
||||
)
|
||||
|
||||
/*case SidebarEnums.blocks.Shortcuts:
|
||||
console.log("SSS", block)
|
||||
return <ShortcutsList {...block.shortcuts} />*/
|
||||
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
display: grid;
|
||||
container-name: sidebar;
|
||||
container-type: inline-size;
|
||||
gap: var(--Spacing-x3);
|
||||
|
||||
border-top: 1px solid var(--Base-Border-Subtle);
|
||||
padding-top: var(--Spacing-x4);
|
||||
}
|
||||
|
||||
.content {
|
||||
@@ -11,8 +15,10 @@
|
||||
@media screen and (min-width: 1367px) {
|
||||
.aside {
|
||||
align-content: flex-start;
|
||||
display: grid;
|
||||
gap: var(--Spacing-x4);
|
||||
|
||||
border-top: 0;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user