let stackCnt = 0 ; export const on = ( ) : void => { stackCnt += 1 ; if ( stackCnt === 1 ) { const body = document . body ; body . style . overflowY = 'hidden' ; body . style . overflowX = 'hidden' ; } } ; export const off = ( ) : void => { stackCnt -= 1 ; if ( stackCnt === 0 ) { const body = document . body ; body . style . overflowY = 'visible' ; body . style . overflowX = 'auto' ; } } ;