fix: refactor buttons on card grid

This commit is contained in:
Christel Westerberg
2024-05-21 14:35:26 +02:00
parent 1bc8753649
commit ad343aa666
6 changed files with 175 additions and 48 deletions

View File

@@ -20,22 +20,8 @@ export default function CardsGrid({ cards_grid }: CardsGridProps) {
scriptedTopTitle={card.scripted_top_title}
heading={card.heading}
bodyText={card.body_text}
secondaryButton={
card.secondaryButton && {
href: card.secondaryButton.link.href,
title: card.secondaryButton.link.title,
openInNewTab: card.secondaryButton.open_in_new_tab,
isExternal: card.secondaryButton.isExternal,
}
}
primaryButton={
card.primaryButton && {
href: card.primaryButton.link.href,
title: card.primaryButton.link.title,
openInNewTab: card.primaryButton.open_in_new_tab,
isExternal: card.primaryButton.isExternal,
}
}
secondaryButton={card.secondaryButton}
primaryButton={card.primaryButton}
/>
))}
</CardGrid>