Skip to content

Commit

Permalink
fixed save ribbon icon not referencing correct styling. added hover a…
Browse files Browse the repository at this point in the history
…nimation for ribbon. improved readability of ternary operators for saveRibbon
  • Loading branch information
kea-roy committed May 4, 2024
1 parent aa57808 commit 234e365
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: '40px',
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 234e365

Please sign in to comment.