Skip to content

Commit

Permalink
fixed save ribbon styling, simplified ternary readability, added save…
Browse files Browse the repository at this point in the history
… ribbon hover animation
  • Loading branch information
kea-roy committed May 4, 2024
1 parent 3e2050d commit 100b703
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions frontend/src/components/ApartmentCard/ApartmentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ const useStyles = makeStyles({
},
},
saveRibbonIcon: {
marginLeft: 'auto',
padding: 0,
width: '34px',
height: '24px',
objectPosition: 'center',
objectFit: 'cover',
transition: 'scale 0.2s',
'&:hover': {
backgroundColor: 'transparent',
scale: '0.9',
},
},
});
Expand Down Expand Up @@ -267,13 +271,8 @@ const ApartmentCard = ({
className={saveRibbonIcon}
>
<img
src={savedIsHovered ? saved : isSaved ? saved : unsaved}
src={savedIsHovered || isSaved ? saved : unsaved}
alt={isSaved ? 'Saved' : 'Unsaved'}
style={{
height: '24px',
objectPosition: 'center',
objectFit: 'cover',
}}
/>
</IconButton>
</Grid>
Expand Down

0 comments on commit 100b703

Please sign in to comment.