@fenderdigital/off-viewport-ui
v1.0.0
Published
Fender JS Utilities off-viewport-ui Module
Downloads
4
Readme
off-viewport-ui
module for Fender JS Utilities
Installation and Usage
yarn add @fenderdigital/off-viewport-ui --save
import disableBodyScroll from '@fenderdigital/off-viewport-ui';
List of functions in module
disableBodyScroll
disableBodyScroll
Description
Conditionally, disable body scroll. This is function is typically used by the OffCanvas and Modal components. Also, applicable to other ui elements with similar off viewport behavior.
Function parameters
isVisible
- Boolean to conditionally add tachyon classes to prevent scrolling on body and html elements.
| paramName | paramType | defaultValue | | --------- | --------- | ------------ | | isVisible | boolean | null |
Development
Check the Monorepo README for development documentation.