feat(BOOK-743): Replaced deprecated Button component
Approved-by: Bianca Widstam
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { InfoCard } from "@scandic-hotels/design-system/InfoCard"
|
||||
import { TeaserCard } from "@scandic-hotels/design-system/TeaserCard"
|
||||
import {
|
||||
CardsGridEnum,
|
||||
CardsGridLayoutEnum,
|
||||
} from "@scandic-hotels/trpc/types/cardsGridEnum"
|
||||
|
||||
import InfoCard from "@/components/ContentType/StartPage/InfoCard"
|
||||
import InfoCardWithImage from "@/components/ContentType/StartPage/InfoCardWithImage"
|
||||
import { Section } from "@/components/Section"
|
||||
import { SectionHeader } from "@/components/Section/Header"
|
||||
import Card from "@/components/TempDesignSystem/Card"
|
||||
import Grids from "@/components/TempDesignSystem/Grids"
|
||||
import LoyaltyCard from "@/components/TempDesignSystem/LoyaltyCard"
|
||||
|
||||
@@ -55,33 +55,21 @@ export default function CardsGrid({
|
||||
<Grids.Stackable columns={columns}>
|
||||
{cards_grid.cards.map((card, index) => {
|
||||
switch (card.__typename) {
|
||||
case CardsGridEnum.cards.Card:
|
||||
return (
|
||||
<Card
|
||||
theme={
|
||||
card.backgroundImage ? "image" : (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}
|
||||
backgroundImage={card.backgroundImage}
|
||||
imageGradient
|
||||
/>
|
||||
)
|
||||
case CardsGridEnum.cards.InfoCard:
|
||||
return (
|
||||
<InfoCard
|
||||
key={card.system.uid}
|
||||
scriptedTopTitle={card.scriptedTopTitle}
|
||||
heading={card.heading}
|
||||
bodyText={card.bodyText}
|
||||
image={card.image}
|
||||
theme={card.theme ?? "one"}
|
||||
primaryButton={card.primaryButton}
|
||||
secondaryButton={card.secondaryButton}
|
||||
{...card}
|
||||
topTitleAngled
|
||||
theme={card.backgroundImage ? "Image" : cards_grid.theme}
|
||||
/>
|
||||
)
|
||||
case CardsGridEnum.cards.InfoCardWithImage:
|
||||
return (
|
||||
<InfoCardWithImage
|
||||
key={card.system.uid}
|
||||
{...card}
|
||||
topTitleAngled
|
||||
imagePosition={index % 2 === 0 ? "right" : "left"}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user