Skip to content

Commit

Permalink
fix: hover state style of ListItems which are clickable to be in line…
Browse files Browse the repository at this point in the history
… with other buttons (#223)

* fix: hover state style of ListItems which are clickable to be in line with other buttons

* fix: hover state of the SideBarStatus button
  • Loading branch information
vojtechsimetka committed Oct 11, 2021
1 parent 83c6d13 commit 6c3f6c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/SideBarStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ const useStyles = makeStyles((theme: Theme) =>
button: {
'&:hover': {
backgroundColor: '#2c2c2c',
color: 'white',

// https://github.com/mui-org/material-ui/issues/22543
'@media (hover: none)': {
backgroundColor: '#2c2c2c',
color: 'white',
},
},
},
Expand Down
13 changes: 13 additions & 0 deletions src/theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ declare module '@material-ui/core/styles/createPalette' {

// Overwriting default components styles
const componentsOverrides = (theme: Theme) => ({
MuiListItem: {
button: {
'&:hover': {
backgroundColor: '#fcf2e8',
color: theme.palette.primary.main,
// https://github.com/mui-org/material-ui/issues/22543
'@media (hover: none)': {
backgroundColor: '#fcf2e8',
color: theme.palette.primary.main,
},
},
},
},
MuiContainer: {
root: { padding: theme.spacing(8) },
maxWidthXs: { padding: theme.spacing(8) },
Expand Down

0 comments on commit 6c3f6c1

Please sign in to comment.