feat(SW-219): add ability to always stack buttons

This commit is contained in:
Chuma McPhoy
2024-09-11 15:40:41 +02:00
parent 3e08b3357b
commit 3eb7e5f653
5 changed files with 51 additions and 13 deletions

View File

@@ -21,9 +21,10 @@ export default function ContentCard({
sidePeekCTA,
backgroundImage,
style = "default",
alwaysStack = false,
className,
}: ContentCardProps) {
const cardClasses = contentCardVariants({ style, className })
const cardClasses = contentCardVariants({ style, alwaysStack, className })
return (
<div className={cardClasses}>
@@ -58,7 +59,12 @@ export default function ContentCard({
) : (
<div className={styles.ctaContainer}>
{primaryCTA && (
<Button asChild intent="primary" size="small">
<Button
asChild
intent="primary"
size="small"
className={styles.ctaButton}
>
<Link
href={primaryCTA.href}
target={primaryCTA.openInNewTab ? "_blank" : undefined}
@@ -68,7 +74,12 @@ export default function ContentCard({
</Button>
)}
{secondaryCTA && (
<Button asChild intent="secondary" size="small">
<Button
asChild
intent="secondary"
size="small"
className={styles.ctaButton}
>
<Link
href={secondaryCTA.href}
target={secondaryCTA.openInNewTab ? "_blank" : undefined}