Skip to content

Commit

Permalink
Improve responsive behavior of MenuItem (#753)
Browse files Browse the repository at this point in the history
  • Loading branch information
vmilan authored Jul 28, 2023
1 parent d287f24 commit a49c06d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Not released

- Improve responsive behavior of MenuItem [#753](https://github.com/CartoDB/carto-react/pull/753)
- Increase documentation discoverability [#751](https://github.com/CartoDB/carto-react/pull/751)

## 2.2
Expand Down
15 changes: 14 additions & 1 deletion packages/react-ui/src/theme/sections/components/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export const navigationOverrides = {
height: theme.spacing(4),
transition: 'background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',

[theme.breakpoints.up('sm')]: {
// Overrides an unwanted Mui default style
'&.MuiButtonBase-root': {
minHeight: theme.spacing(4)
}
},
'&:focus-visible': {
// Solves a known Mui issue: https://github.com/mui/material-ui/issues/23747
backgroundColor: 'transparent',
Expand Down Expand Up @@ -42,7 +48,14 @@ export const navigationOverrides = {
}),
dense: ({ theme }) => ({
minHeight: theme.spacing(3),
height: theme.spacing(3)
height: theme.spacing(3),

[theme.breakpoints.up('sm')]: {
// Overrides an unwanted Mui default style
'&.MuiButtonBase-root': {
minHeight: theme.spacing(3)
}
}
})
}
},
Expand Down

0 comments on commit a49c06d

Please sign in to comment.