diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-19 16:44:52 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-19 16:44:52 +0800 |
commit | 3f43f9bb4c2fe751f2eec7fd9f7c0bce7d59909b (patch) | |
tree | 9008b7b4d6a49ac9eb14656bb7bf791000d5c020 /packages/website | |
parent | ee6bb229e0f912e2ccd9aff70ebf82d98b312251 (diff) | |
download | dexon-0x-contracts-3f43f9bb4c2fe751f2eec7fd9f7c0bce7d59909b.tar.gz dexon-0x-contracts-3f43f9bb4c2fe751f2eec7fd9f7c0bce7d59909b.tar.zst dexon-0x-contracts-3f43f9bb4c2fe751f2eec7fd9f7c0bce7d59909b.zip |
fix: Make sure page scrollable on mobile
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/pages/documentation/developers_page.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 934a4cc36..918a3a635 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -1,4 +1,4 @@ -import { colors, constants as sharedConstants } from '@0x/react-shared'; +import { colors, constants as sharedConstants, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); @@ -71,6 +71,7 @@ export class DevelopersPage extends React.Component<DevelopersPageProps, Develop const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; const mainContentPadding = isSmallScreen ? 20 : 50; const sidebarPadding = 22; + const isUserOnMobile = sharedUtils.isUserOnMobile(); return ( <Container className="flex items-center overflow-hidden" @@ -143,7 +144,7 @@ export class DevelopersPage extends React.Component<DevelopersPageProps, Develop paddingRight: this.state.isHoveringMainContent ? mainContentPadding - SCROLLER_WIDTH : mainContentPadding, - overflow: this.state.isHoveringMainContent ? 'auto' : 'hidden', + overflow: this.state.isHoveringMainContent || isUserOnMobile ? 'auto' : 'hidden', }} onMouseEnter={this._onMainContentHover.bind(this, true)} onMouseOver={this._onMainContentHover.bind(this, true)} |