feat(SW-219): add support for content card in cards grid in content pages
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import SectionContainer from "@/components/Section/Container"
|
||||
import SectionHeader from "@/components/Section/Header"
|
||||
import Card from "@/components/TempDesignSystem/Card"
|
||||
import ContentCard from "@/components/TempDesignSystem/ContentCard"
|
||||
import Grids from "@/components/TempDesignSystem/Grids"
|
||||
import LoyaltyCard from "@/components/TempDesignSystem/LoyaltyCard"
|
||||
|
||||
@@ -22,17 +23,32 @@ export default function CardsGrid({
|
||||
{cards_grid.cards.map((card) => {
|
||||
switch (card.__typename) {
|
||||
case CardsGridEnum.Card: {
|
||||
return (
|
||||
<Card
|
||||
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}
|
||||
/>
|
||||
)
|
||||
if (card.isContentCard) {
|
||||
return (
|
||||
<ContentCard
|
||||
key={card.system.uid}
|
||||
title={card.heading || ""}
|
||||
description={card.body_text || ""}
|
||||
primaryButton={card.primaryButton}
|
||||
secondaryButton={card.secondaryButton}
|
||||
sidePeekButton={card.sidePeekButton}
|
||||
backgroundImage={card.background_image}
|
||||
style="default"
|
||||
/>
|
||||
)
|
||||
} else {
|
||||
return (
|
||||
<Card
|
||||
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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
case CardsGridEnum.LoyaltyCard:
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user