Skip to content

Commit 2d80c56

Browse files
committed
Update
Signed-off-by: Varad Gupta <[email protected]>
1 parent 2901165 commit 2d80c56

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/components/Workshop-Card/WorkshopsCardWrapper.style.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ const WorkshopCardWrapper = styled.div`
4242
width: 100%;
4343
height: auto;
4444
margin-bottom: 1.25rem;
45+
46+
img{
47+
object-fit: contain !important;
48+
}
4549
}
4650
4751
.image {
@@ -53,6 +57,8 @@ const WorkshopCardWrapper = styled.div`
5357
5458
.gatsby-image-wrapper,.old-gatsby-image-wrapper {
5559
height: 90%;
60+
max-height: 40rem;
61+
5662
}
5763
}
5864

src/components/image.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ const Image = ({ childImageSharp, extension, publicURL, alt, imgStyle, ...rest }
2020
</div>
2121
);
2222
}
23+
console.log(childImageSharp, publicURL);
2324

2425
return <GatsbyImage
2526
key={publicURL}
2627
image={childImageSharp?.gatsbyImageData}
2728
alt={alt || "Blog image"}
29+
style={{
30+
objectFit: imgStyle?.objectFit || "cover",
31+
}}
2832
{...rest}
2933
/>;
3034
};

0 commit comments

Comments
 (0)