@ -1,23 +1,12 @@
import PropTypes from 'prop-types' ;
import PropTypes from 'prop-types' ;
import React , { Component } from 'react' ;
import React , { Component } from 'react' ;
import OverlayScroller from 'Components/Scroller/OverlayScroller' ;
import Scroller from 'Components/Scroller/Scroller' ;
import Scroller from 'Components/Scroller/Scroller' ;
import { scrollDirections } from 'Helpers/Props' ;
import { scrollDirections } from 'Helpers/Props' ;
import { isMobile as isMobileUtil } from 'Utilities/mobile' ;
import { isLocked } from 'Utilities/scrollLock' ;
import { isLocked } from 'Utilities/scrollLock' ;
import styles from './PageContentBody.css' ;
import styles from './PageContentBody.css' ;
class PageContentBody extends Component {
class PageContentBody extends Component {
//
// Lifecycle
constructor ( props , context ) {
super ( props , context ) ;
this . _isMobile = isMobileUtil ( ) ;
}
//
//
// Listeners
// Listeners
@ -41,10 +30,8 @@ class PageContentBody extends Component {
... otherProps
... otherProps
} = this . props ;
} = this . props ;
const ScrollerComponent = this . _isMobile ? Scroller : OverlayScroller ;
return (
return (
< Scroller Component
< Scroller
className = { className }
className = { className }
scrollDirection = { scrollDirections . VERTICAL }
scrollDirection = { scrollDirections . VERTICAL }
{ ... otherProps }
{ ... otherProps }
@ -53,7 +40,7 @@ class PageContentBody extends Component {
< div className = { innerClassName } >
< div className = { innerClassName } >
{ children }
{ children }
< / d i v >
< / d i v >
< / S c r o l l e r Co m p o n e n t >
< / S c r o l l e r >
) ;
) ;
}
}
}
}