UNPKG

738 BTypeScriptView Raw
1import * as React from 'react';
2import type { ScrollView } from 'react-native';
3declare type ScrollOptions = {
4 x?: number;
5 y?: number;
6 animated?: boolean;
7};
8declare type ScrollableView = {
9 scrollToTop(): void;
10} | {
11 scrollTo(options: ScrollOptions): void;
12} | {
13 scrollToOffset(options: {
14 offset?: number;
15 animated?: boolean;
16 }): void;
17} | {
18 scrollResponderScrollTo(options: ScrollOptions): void;
19};
20declare type ScrollableWrapper = {
21 getScrollResponder(): React.ReactNode | ScrollView;
22} | {
23 getNode(): ScrollableView;
24} | ScrollableView;
25export default function useScrollToTop(ref: React.RefObject<ScrollableWrapper>): void;
26export {};
27//# sourceMappingURL=useScrollToTop.d.ts.map
\No newline at end of file