UNPKG

@sdcx/pull-to-refresh

Version:
26 lines (25 loc) 1.3 kB
import { Component, ReactNode } from 'react'; import { NativeSyntheticEvent, ViewProps } from 'react-native'; import { PullToRefreshOffsetChangedEvent, PullToRefreshStateChangedEvent } from '../types'; import PullToRefreshFooterNativeComponent from './PullToRefreshFooterNativeComponent'; import { StateChangedEventPayload } from './PullToRefreshFooterNativeComponent'; interface NativePullToRefreshFooterProps extends ViewProps { onRefresh?: () => void; onStateChanged?: (event: PullToRefreshStateChangedEvent) => void; onOffsetChanged?: (event: PullToRefreshOffsetChangedEvent) => void; refreshing: boolean; noMoreData?: boolean; manual?: boolean; } type NativePullToRefreshFooterInstance = InstanceType<typeof PullToRefreshFooterNativeComponent>; declare class PullToRefreshFooter extends Component<NativePullToRefreshFooterProps> { _nativeRef: NativePullToRefreshFooterInstance | null; _lastNativeRefreshing: boolean; _onRefresh: () => void; _onStateChanged: (event: NativeSyntheticEvent<StateChangedEventPayload>) => void; _setNativeRef: (ref: NativePullToRefreshFooterInstance) => void; componentDidMount(): void; componentDidUpdate(prevProps: NativePullToRefreshFooterProps): void; render(): ReactNode; } export { PullToRefreshFooter };