UNPKG

@resourge/react-fetch

Version:

[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

36 lines (35 loc) 1.48 kB
/** * react-fetch v1.43.1 * * Copyright (c) resourge. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import { type CSSProperties, type MutableRefObject, type ReactNode } from 'react'; import { type InfiniteLoadingReturn } from '../../hooks'; type RefreshControlProps<Data extends any[], FilterSearchParams extends Record<string, any> = Record<string, any>> = { context: InfiniteLoadingReturn<Data, FilterSearchParams>; containerStyle?: CSSProperties; detectionMargin?: string; /** * By default is false */ preload?: boolean; renderComponent?: (props: { isLastIncomplete: boolean; onClick: () => void; }) => ReactNode; /** * Determines the nearest scrolling parent (overflow container) by default. * If no `root` is provided, it searches for the closest overflow parent, otherwise, it defaults to the `window`. */ root?: IntersectionObserverInit['root'] | MutableRefObject<IntersectionObserverInit['root']>; }; /** * Component to help useInfiniteScroll control the scroll */ declare function RefreshControl<Data extends any[], FilterSearchParams extends Record<string, any> = Record<string, any>>({ context, root, detectionMargin, renderComponent, preload, containerStyle }: RefreshControlProps<Data, FilterSearchParams>): import("react/jsx-runtime").JSX.Element; export default RefreshControl;