fix(SW-302): add Card image gradient as prop

This commit is contained in:
Matilda Landström
2024-10-01 14:02:22 +02:00
parent e7f6cc7268
commit 42cf49deae
3 changed files with 4 additions and 1 deletions

View File

@@ -103,6 +103,7 @@ export default function MegaMenu({
scriptedTopTitle={card.scripted_top_title}
onPrimaryButtonClick={handleNavigate}
onSecondaryButtonClick={handleNavigate}
imageGradient
theme="image"
/>
</div>

View File

@@ -25,6 +25,7 @@ export interface CardProps
bodyText?: string | null
imageHeight?: number
imageWidth?: number
imageGradient?: boolean
onPrimaryButtonClick?: () => void
onSecondaryButtonClick?: () => void
backgroundImage?: ImageVaultAsset | ApiImage

View File

@@ -24,6 +24,7 @@ export default function Card({
backgroundImage,
imageHeight,
imageWidth,
imageGradient,
onPrimaryButtonClick,
onSecondaryButtonClick,
}: CardProps) {
@@ -45,7 +46,7 @@ export default function Card({
})}
>
{backgroundImage && (
<div className={styles.imageWrapper}>
<div className={imageGradient ? styles.imageWrapper : ""}>
<Image
src={backgroundImage.url}
className={styles.image}