import { type ReactNode, type ComponentType } from 'react'; import '../styles/components/data-loader.scss'; export type WrapperProps = { /** * Callback to request more items if user scrolled to the bottom of the scroll-container or if * the scroll-container isn't scrollable yet because not enough items have been loaded yet. If * not provided this component will simply pass the data prop to the BaseComponent to be rendered * without observing scroll or triggering more data loading. */ onLoadMoreItems: () => void; /** * A boolean to indicate that the parent has more items to provide. */ hasMoreData: boolean; /** * A custom loader component */ loaderComponent?: ReactNode; /** * Data that is being represented in the wrapped component */ data: D[]; /** * Use a button to load more data instead of having infinite scrolling. * If this prop is a string or a node, it will render this within the button */ clickToLoad?: boolean | ReactNode; }; type BaseComponentProps = { data: D[]; }; declare function withDataLoader, P extends BaseComponentProps>(BaseComponent: ComponentType

): import("react").FunctionComponent

>; export default withDataLoader; //# sourceMappingURL=data-loader.d.ts.map