fix(SW-302): add Card image gradient as prop
This commit is contained in:
@@ -103,6 +103,7 @@ export default function MegaMenu({
|
|||||||
scriptedTopTitle={card.scripted_top_title}
|
scriptedTopTitle={card.scripted_top_title}
|
||||||
onPrimaryButtonClick={handleNavigate}
|
onPrimaryButtonClick={handleNavigate}
|
||||||
onSecondaryButtonClick={handleNavigate}
|
onSecondaryButtonClick={handleNavigate}
|
||||||
|
imageGradient
|
||||||
theme="image"
|
theme="image"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export interface CardProps
|
|||||||
bodyText?: string | null
|
bodyText?: string | null
|
||||||
imageHeight?: number
|
imageHeight?: number
|
||||||
imageWidth?: number
|
imageWidth?: number
|
||||||
|
imageGradient?: boolean
|
||||||
onPrimaryButtonClick?: () => void
|
onPrimaryButtonClick?: () => void
|
||||||
onSecondaryButtonClick?: () => void
|
onSecondaryButtonClick?: () => void
|
||||||
backgroundImage?: ImageVaultAsset | ApiImage
|
backgroundImage?: ImageVaultAsset | ApiImage
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export default function Card({
|
|||||||
backgroundImage,
|
backgroundImage,
|
||||||
imageHeight,
|
imageHeight,
|
||||||
imageWidth,
|
imageWidth,
|
||||||
|
imageGradient,
|
||||||
onPrimaryButtonClick,
|
onPrimaryButtonClick,
|
||||||
onSecondaryButtonClick,
|
onSecondaryButtonClick,
|
||||||
}: CardProps) {
|
}: CardProps) {
|
||||||
@@ -45,7 +46,7 @@ export default function Card({
|
|||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
{backgroundImage && (
|
{backgroundImage && (
|
||||||
<div className={styles.imageWrapper}>
|
<div className={imageGradient ? styles.imageWrapper : ""}>
|
||||||
<Image
|
<Image
|
||||||
src={backgroundImage.url}
|
src={backgroundImage.url}
|
||||||
className={styles.image}
|
className={styles.image}
|
||||||
|
|||||||
Reference in New Issue
Block a user