import * as React from 'react'; export interface InfiniteScrollProps { /** * @ignore */ children?: void; /** * Method to load more items. */ loadItems(offset: number): void; /** * Sets the button mode. If true the component will render the default * 'Show More' button. In case a string is supplied the default button * will be rendered with the given string. Otherwise, if a React component * is provided it will render the provided component. */ button?: boolean | string | React.ComponentType; /** * Pixels left to bottom of the page, at which loadItems() function will * be called. Used 'scroll' mode. * @default 0px */ edgeOffset?: number; /** * The height of the scrolling container in pixels. This is a required * prop if useWindow is not set to true. * @default 0px */ containerHeight?: number; /** * This option allows the window to be used as the scroll container, instead * of an arbitrary div created by this component, when it is set to true. * @default false */ useWindow?: boolean; /** * The optional host element to be used. */ host?: string | React.ComponentClass | React.StatelessComponent; /** * This prop receives data that is displayed in this component. */ data: React.ReactNodeArray; /** * This prop let's component know if there is more data to load and call loadItems function on scroll or to display the button. */ hasMore: boolean; /** * Custom loading indicator */ loadingIndicator?: React.ReactNode; } export interface InfiniteScrollState { isButtonMode: boolean; isLoading: boolean; } export interface LoaderButtonProps { onClick(): void; } export declare class InfiniteScroll extends React.Component { private node; constructor(props: InfiniteScrollProps); componentDidMount(): void; componentWillUnmount(): void; UNSAFE_componentWillReceiveProps(nextProps: InfiniteScrollProps): void; private handleOnScroll; private reachedBottom; private loadItems; private renderButton; private setContainer; render(): JSX.Element; static inner: { readonly DefaultButton: any; readonly Container: any; readonly Footer: any; readonly Spinner: React.SFC & { inner: { readonly SpinningContainer: any; readonly Cubes: any; readonly Cube0: any; readonly Cube1: any; readonly SpinningLabel: any; }; }; }; }