Skip to content

Commit

Permalink
Update hover effect using more of Material-UI color pallete (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
voltrare authored Sep 17, 2021
1 parent 32c9bd7 commit bdbaf25
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/components/anime/EpisodeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const useStyles = makeStyles((theme) => ({
card: {
margin: '10px',
'&:hover': {
backgroundColor: 'rgba(255, 255, 255, 0.2)',
transition: 'background-color 0ms ease',
backgroundColor: theme.palette.action.hover,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
'&:active': {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
transition: 'background-color 100ms ease-out',
backgroundColor: theme.palette.action.selected,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
},
}));
Expand Down
8 changes: 8 additions & 0 deletions src/components/anime/SourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ const useStyles = makeStyles((theme) => ({
},
card: {
margin: '10px',
'&:hover': {
backgroundColor: theme.palette.action.hover,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
'&:active': {
backgroundColor: theme.palette.action.selected,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
},
}));

Expand Down
8 changes: 4 additions & 4 deletions src/components/manga/ChapterCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const useStyles = makeStyles((theme) => ({
card: {
margin: '10px',
'&:hover': {
backgroundColor: 'rgba(255, 255, 255, 0.2)',
transition: 'background-color 0ms ease',
backgroundColor: theme.palette.action.hover,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
'&:active': {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
transition: 'background-color 100ms ease-out',
backgroundColor: theme.palette.action.selected,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
},
}));
Expand Down
8 changes: 4 additions & 4 deletions src/components/manga/SourceCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const useStyles = makeStyles((theme) => ({
card: {
margin: '10px',
'&:hover': {
backgroundColor: 'rgba(255, 255, 255, 0.2)',
transition: 'background-color 0ms ease',
backgroundColor: theme.palette.action.hover,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
'&:active': {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
transition: 'background-color 100ms ease-out',
backgroundColor: theme.palette.action.selected,
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
},
showMobile: {
Expand Down

0 comments on commit bdbaf25

Please sign in to comment.