Skip to content

Commit

Permalink
Merge pull request #1042 from City-of-Helsinki/fix/top-bar-settings-m…
Browse files Browse the repository at this point in the history
…enu-size

Fix settings menu hidden overflow visibility
  • Loading branch information
vitalis0itu authored Oct 12, 2023
2 parents b2078d7 + 9498162 commit 4e2b15a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/MenuButton/MenuButton/MenuButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Button, ButtonBase, ClickAwayListener, Divider, Typography,
Button, ButtonBase, ClickAwayListener, Container, Divider, Typography,
} from '@mui/material';
import { FormattedMessage } from 'react-intl';
import styled from '@emotion/styled';
Expand Down Expand Up @@ -52,6 +52,8 @@ class MenuButton extends React.Component {
id={panelID}
aria-label={menuAriaLabel}
role="region"
disableGutters
sx={{ overflowY: panelID === 'SettingsMenuPanel' ? 'visible' : 'auto' }}
>
<Typography sx={{
textAlign: 'left', fontWeight: 700, fontSize: '1.03rem', pb: 1,
Expand Down Expand Up @@ -130,16 +132,14 @@ class MenuButton extends React.Component {
}
}

const StyledMenuPanel = styled('div')(({ theme }) => ({
const StyledMenuPanel = styled(Container)(({ theme }) => ({
display: 'flex',
flexDirection: 'column',
position: 'absolute',
overflowY: 'auto',
maxHeight: `calc(100vh - ${config.topBarHeight}px)`,
width: 450,
padding: theme.spacing(2),
paddingTop: theme.spacing(3),
paddingBottom: theme.spacing(2),
boxSizing: 'border-box',
backgroundColor: 'white',
color: 'black',
Expand Down

0 comments on commit 4e2b15a

Please sign in to comment.