UNPKG

react-scrollsense

Version:

A lightweight scroll sensor to solve your react scroll into viewport issues.

32 lines (31 loc) 1.19 kB
import React from "react"; import '../shared/polyfills'; import { NativeScrollContext, ParsedNativeConfig, ScrollSenseProps, ScrollSenseState, ScrollEntry } from './types'; import { Tracker } from '../types'; declare const ScrollContextNativeScroll: React.Context<NativeScrollContext>; declare class ScrollSense extends React.Component<ScrollSenseProps, ScrollSenseState> { options: ParsedNativeConfig; setOptions(): void; constructor(props: any); i: number; wndHeight: number; wndWidth: number; scrollEntryItems: ScrollEntry[]; isOverflow(prop: any): boolean; getOverflowParent: (el: any) => any; triggerDocumentScroll: any; addTrackingFn(el: any, fn: any, options: any): Tracker; updateTrackingFn(el: any, fn: any, options: any): void; removeTracking(el: any): void; getScrollTop(): number; getScrollLeft(): number; handleScroll(evt: any): void; onScroll(evt: any): void; onResize(): void; onViewportChange(): void; componentDidMount(): void; componentWillUnmount(): void; render(): JSX.Element; } export { ScrollContextNativeScroll }; export default ScrollSense;