UNPKG

@sdcx/pull-to-refresh

Version:
24 lines (23 loc) 1.25 kB
import { Component, ReactNode } from 'react'; import { NativeSyntheticEvent, ViewProps } from 'react-native'; import { PullToRefreshOffsetChangedEvent, PullToRefreshStateChangedEvent } from '../types'; import PullToRefreshHeaderNativeComponent, { StateChangedEventPayload } from './PullToRefreshHeaderNativeComponent'; interface NativePullToRefreshHeaderProps extends ViewProps { onRefresh?: () => void; onStateChanged?: (event: PullToRefreshStateChangedEvent) => void; onOffsetChanged?: (event: PullToRefreshOffsetChangedEvent) => void; refreshing: boolean; progressViewOffset?: number | undefined; } type NativePullToRefreshHeaderInstance = InstanceType<typeof PullToRefreshHeaderNativeComponent>; declare class PullToRefreshHeader extends Component<NativePullToRefreshHeaderProps> { _nativeRef: NativePullToRefreshHeaderInstance | null; _lastNativeRefreshing: boolean; _onRefresh: () => void; _onStateChanged: (event: NativeSyntheticEvent<StateChangedEventPayload>) => void; _setNativeRef: (ref: NativePullToRefreshHeaderInstance) => void; componentDidMount(): void; componentDidUpdate(prevProps: NativePullToRefreshHeaderProps): void; render(): ReactNode; } export { PullToRefreshHeader };