fix(SW-1188): add card variant
This commit is contained in:
@@ -32,6 +32,7 @@ export default function Card({
|
||||
imageGradient,
|
||||
onPrimaryButtonClick,
|
||||
onSecondaryButtonClick,
|
||||
height,
|
||||
}: CardProps) {
|
||||
const buttonTheme = getButtonTheme(theme)
|
||||
const titleFontColor = getTitleFontColor(theme)
|
||||
@@ -46,15 +47,21 @@ export default function Card({
|
||||
? backgroundImage.dimensions.aspectRatio * imageHeight
|
||||
: 420)
|
||||
|
||||
const imageWrapper =
|
||||
height === "dynamic"
|
||||
? `${styles.imageWrapper} ${styles.dynamic}`
|
||||
: `${styles.imageWrapper} ${styles.fixed}`
|
||||
|
||||
return (
|
||||
<article
|
||||
className={cardVariants({
|
||||
theme,
|
||||
height,
|
||||
className,
|
||||
})}
|
||||
>
|
||||
{backgroundImage && (
|
||||
<div className={imageGradient ? styles.imageWrapper : ""}>
|
||||
<div className={imageGradient ? imageWrapper : ""}>
|
||||
<Image
|
||||
src={backgroundImage.url}
|
||||
className={styles.image}
|
||||
|
||||
Reference in New Issue
Block a user