UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

18 lines (15 loc) 329 B
// @ts-nocheck import getWindow from './getWindow'; import { Window } from '../types'; /** * @param node */ export default function getWindowScroll(node: Node | Window) { const win = getWindow(node); const scrollLeft = win.pageXOffset; const scrollTop = win.pageYOffset; return { scrollLeft, scrollTop }; }