Skip to content

Commit 785a382

Browse files
author
Kevin Koech
committed
fix: update CategoryCard styles for improved overlay opacity and responsive image handling
1 parent 3ca4b3e commit 785a382

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/trustlab/src/components/CategoryCard/CategoryCard.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const CategoryCard = forwardRef(function CategoryCard(props, ref) {
3636
position: "relative",
3737
borderRadius: "10px",
3838
overflow: "hidden",
39-
"&:hover .overlay": { opacity: 1 },
39+
"&:hover .overlay": { opacity: { xs: 0, sm: 1 } },
4040
}}
4141
>
4242
<CardMedia
@@ -45,8 +45,8 @@ const CategoryCard = forwardRef(function CategoryCard(props, ref) {
4545
alt={image.alt ?? title}
4646
sx={{
4747
borderRadius: "10px",
48-
objectFit: "cover",
49-
height: { xs: 380, sm: 220 },
48+
objectFit: { xs: "cover", sm: "contain", md: "cover" },
49+
height: { xs: 190, sm: 160, md: 220 },
5050
}}
5151
/>
5252
<Box

0 commit comments

Comments
 (0)