fix(SW-1188): set height of image wrapper

This commit is contained in:
Fredrik Thorsson
2025-01-10 11:05:39 +01:00
parent af23702116
commit 41c955cb07
2 changed files with 6 additions and 5 deletions

View File

@@ -23,6 +23,7 @@
.imageWrapper { .imageWrapper {
display: flex; display: flex;
width: 100%; width: 100%;
height: 100%;
} }
.imageWrapper::after { .imageWrapper::after {

View File

@@ -47,10 +47,10 @@ export default function Card({
? backgroundImage.dimensions.aspectRatio * imageHeight ? backgroundImage.dimensions.aspectRatio * imageHeight
: 420) : 420)
const imageWrapper = // const imageWrapper =
height === "dynamic" // height === "dynamic"
? `${styles.imageWrapper} ${styles.dynamic}` // ? `${styles.imageWrapper} ${styles.dynamic}`
: `${styles.imageWrapper} ${styles.fixed}` // : `${styles.imageWrapper} ${styles.fixed}`
return ( return (
<article <article
@@ -61,7 +61,7 @@ export default function Card({
})} })}
> >
{backgroundImage && ( {backgroundImage && (
<div className={imageGradient ? imageWrapper : ""}> <div className={imageGradient ? styles.imageWrapper : ""}>
<Image <Image
src={backgroundImage.url} src={backgroundImage.url}
className={styles.image} className={styles.image}