fix(SW-219): review comments
This commit is contained in:
@@ -22,34 +22,29 @@ export default function CardsGrid({
|
||||
<Grids.Stackable>
|
||||
{cards_grid.cards.map((card) => {
|
||||
switch (card.__typename) {
|
||||
case CardsGridEnum.Card: {
|
||||
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.Card:
|
||||
return card.isContentCard ? (
|
||||
<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"
|
||||
/>
|
||||
) : (
|
||||
<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 (
|
||||
<LoyaltyCard
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { VariantProps } from "class-variance-authority"
|
||||
|
||||
import { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
import { contentCardVariants } from "@/components/TempDesignSystem/ContentCard/variants"
|
||||
|
||||
import { ImageVaultAsset } from "@/types/components/imageVault"
|
||||
import type { CardProps } from "@/components/TempDesignSystem/Card/card"
|
||||
|
||||
export interface SidePeekButton {
|
||||
interface SidePeekButton {
|
||||
title: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user