@eccenca/gui-elements
Version:
GUI elements based on other libraries, usable in React application, written in Typescript.
10 lines (9 loc) • 455 B
TypeScript
/**
* Find the scroll parent of an element, returns `false` if it cannot be found.
* In case of a `false` return the very probably `document.documentElement` is the parent.
* In this case `window` object should be used for scroll event listeners.
* See `src/components/Sticky/StickyTarget.tsx` for an usage example.
* @param element
* @returns HTMLElement | false
*/
export declare const getScrollParent: (element: Element) => HTMLElement | false;