UNPKG

@dynamic-labs/sdk-react-core

Version:

A React SDK for implementing wallet web3 authentication and authorization to your website.

18 lines (14 loc) 616 B
'use client' 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const isScrollable = (element) => { const hasScrollableContent = element.scrollHeight > element.clientHeight; // It's not enough because the element's `overflow-y` style can be set as // * `hidden` // * `hidden !important` // In those cases, the scrollbar isn't shown const overflowYStyle = window.getComputedStyle(element).overflowY; const isOverflowHidden = overflowYStyle.indexOf('hidden') !== -1; return hasScrollableContent && !isOverflowHidden; }; exports.isScrollable = isScrollable;