scroll.d.ts 957 B

1234567891011121314
  1. //#region ../../packages/utils/dom/scroll.d.ts
  2. declare const isScroll: (el: HTMLElement, isVertical?: boolean) => boolean;
  3. declare const getScrollContainer: (el: HTMLElement, isVertical?: boolean) => Window | HTMLElement | undefined;
  4. declare const getScrollBarWidth: (namespace: string) => number;
  5. /**
  6. * Scroll with in the container element, positioning the **selected** element at the top
  7. * of the container
  8. */
  9. declare function scrollIntoView(container: HTMLElement, selected: HTMLElement): void;
  10. declare function animateScrollTo(container: HTMLElement | Window, from: number, to: number, duration: number, callback?: unknown): () => void;
  11. declare const getScrollElement: (target: HTMLElement, container: HTMLElement | Window) => HTMLElement;
  12. declare const getScrollTop: (container: HTMLElement | Window) => number;
  13. //#endregion
  14. export { animateScrollTo, getScrollBarWidth, getScrollContainer, getScrollElement, getScrollTop, isScroll, scrollIntoView };