Update hover effect using more of Material-UI color pallete (#29)

This commit is contained in:
voltrare
2021-09-17 16:07:03 +08:00
committed by GitHub
parent 32c9bd76c7
commit bdbaf256a8
4 changed files with 20 additions and 12 deletions

View File

@@ -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',
},
},
}));

View File

@@ -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',
},
},
}));

View File

@@ -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',
},
},
}));

View File

@@ -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: {