feat(SW-391): Added sidepeek functionality to teasercard
This commit is contained in:
@@ -7,11 +7,15 @@ import TeaserCard from "@/components/TempDesignSystem/TeaserCard"
|
||||
|
||||
import type { CardsGridProps } from "@/types/components/blocks/cardsGrid"
|
||||
import { CardsGridEnum } from "@/types/enums/cardsGrid"
|
||||
import { CardsGridLayoutEnum } from "@/types/trpc/routers/contentstack/blocks"
|
||||
|
||||
export default function CardsGrid({
|
||||
cards_grid,
|
||||
firstItem = false,
|
||||
}: CardsGridProps) {
|
||||
const columns =
|
||||
cards_grid.layout === CardsGridLayoutEnum.THREE_COLUMNS ? 3 : 2
|
||||
|
||||
return (
|
||||
<SectionContainer>
|
||||
<SectionHeader
|
||||
@@ -19,7 +23,7 @@ export default function CardsGrid({
|
||||
preamble={cards_grid.preamble}
|
||||
topTitle={firstItem}
|
||||
/>
|
||||
<Grids.Stackable>
|
||||
<Grids.Stackable columns={columns}>
|
||||
{cards_grid.cards.map((card) => {
|
||||
switch (card.__typename) {
|
||||
case CardsGridEnum.cards.Card:
|
||||
@@ -43,6 +47,7 @@ export default function CardsGrid({
|
||||
primaryButton={card.primaryButton}
|
||||
secondaryButton={card.secondaryButton}
|
||||
sidePeekButton={card.sidePeekButton}
|
||||
sidePeekContent={card.sidePeekContent}
|
||||
image={card.image}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user