UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

23 lines (22 loc) 888 B
import { makeGenericController } from '@arcgis/lumina/controllers'; import { LitElement } from '@arcgis/lumina'; /** * Interface representing a component that can prevent document scrolling. */ export interface PreventDocumentScrollComponent extends LitElement { /** * Indicates whether the component is currently opened. */ opened: boolean; /** * Indicates whether the component should prevent document scrolling when opened. */ preventDocumentScroll: boolean; } /** * Creates a controller to manage document scroll prevention for a component. * * This controller tracks the number of components requesting scroll prevention * and ensures that the document's scroll behavior is only modified when necessary. */ export declare const usePreventDocumentScroll: () => ReturnType<typeof makeGenericController<void, PreventDocumentScrollComponent>>;