This commit is contained in:
mgabdev
2020-05-14 02:03:22 -04:00
parent ef880dec76
commit 4acc21944c
26 changed files with 452 additions and 69 deletions

View File

@@ -24,7 +24,7 @@ export default class PopoverLayout extends PureComponent {
if (isXS) {
return (
<div className={[_s.default, _s.bgPrimary, _s.overflowHidden, _s.modal, _s.topRightRadiusSmall, _s.topLeftRadiusSmall].join(' ')}>
<div className={[_s.default, _s.bgPrimary, _s.modal, _s.topRightRadiusSmall, _s.topLeftRadiusSmall].join(' ')}>
{
!!title &&
<div className={[_s.default, _s.flexRow, _s.alignItemsCenter, _s.justifyContentCenter, _s.borderBottom1PX, _s.borderColorSecondary, _s.height53PX, _s.px15].join(' ')}>
@@ -33,7 +33,7 @@ export default class PopoverLayout extends PureComponent {
</Heading>
</div>
}
<div className={[_s.default, _s.heightMax80VH, _s.overflowYScroll].join(' ')}>
<div className={[_s.default, _s.heightMax80VH, _s.topRightRadiusSmall, _s.topLeftRadiusSmall, _s.overflowYScroll].join(' ')}>
{children}
</div>
</div>

View File

@@ -79,6 +79,17 @@ class PopoverRoot extends PureComponent {
window.removeEventListener('resize', this.handleResize, false)
}
componentDidUpdate() {
const { type } = this.props
const { width } = this.state
if (width <= BREAKPOINT_EXTRA_SMALL && !!type) {
document.body.classList.add(_s.overflowYHidden)
} else {
document.body.classList.remove(_s.overflowYHidden)
}
}
handleResize = () => {
const { width } = getWindowDimension()

View File

@@ -55,7 +55,7 @@ class SidebarMorePopover extends PureComponent {
},
{
title: intl.formatMessage(messages.settings),
href: '/settings',
href: '/settings/preferences',
},
{
title: intl.formatMessage(messages.logout),