1.0.0 • Published 5 years ago

@fenderdigital/off-viewport-ui v1.0.0

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
5 years ago

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.
paramNameparamTypedefaultValue
isVisiblebooleannull

Development

Check the Monorepo README for development documentation.