@sdcx/pull-to-refresh
Version:
A react-native PullToRefresh component.
22 lines (21 loc) • 1.08 kB
TypeScript
import { Component, ReactNode } from 'react';
import { ViewProps } from 'react-native';
import { PullToRefreshOffsetChangedEvent, PullToRefreshStateChangedEvent } from '../types';
interface NativePullToRefreshHeaderProps extends ViewProps {
onRefresh?: () => void;
onStateChanged?: (event: PullToRefreshStateChangedEvent) => void;
onOffsetChanged?: (event: PullToRefreshOffsetChangedEvent) => void;
refreshing: boolean;
}
declare const NativePullToRefreshHeader: import("react-native").HostComponent<NativePullToRefreshHeaderProps>;
type NativePullToRefreshHeaderInstance = InstanceType<typeof NativePullToRefreshHeader>;
declare class PullToRefreshHeader extends Component<NativePullToRefreshHeaderProps> {
_nativeRef: NativePullToRefreshHeaderInstance | null;
_lastNativeRefreshing: boolean;
_onRefresh: () => void;
_setNativeRef: (ref: NativePullToRefreshHeaderInstance) => void;
componentDidMount(): void;
componentDidUpdate(prevProps: NativePullToRefreshHeaderProps): void;
render(): ReactNode;
}
export { PullToRefreshHeader };