UNPKG

2.27 kBTypeScriptView Raw
1import * as React from 'react';
2import { ScrollViewProps as RNScrollViewProps, SwitchProps as RNSwitchProps, TextInputProps as RNTextInputProps, DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps, FlatList as RNFlatList, FlatListProps as RNFlatListProps } from 'react-native';
3import { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
4export declare const ScrollView: React.ForwardRefExoticComponent<RNScrollViewProps & {
5 children?: React.ReactNode;
6} & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
7export declare type ScrollView = typeof ScrollView & {
8 scrollTo(y?: number | {
9 x?: number;
10 y?: number;
11 animated?: boolean;
12 }, x?: number, animated?: boolean): void;
13 scrollToEnd(options?: {
14 animated: boolean;
15 }): void;
16};
17export declare const Switch: React.ForwardRefExoticComponent<RNSwitchProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
18export declare type Switch = typeof Switch;
19export declare const TextInput: React.ForwardRefExoticComponent<RNTextInputProps & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
20export declare type TextInput = typeof TextInput;
21export declare const DrawerLayoutAndroid: React.ForwardRefExoticComponent<RNDrawerLayoutAndroidProps & {
22 children?: React.ReactNode;
23} & NativeViewGestureHandlerProps & React.RefAttributes<React.ComponentType<any>>>;
24export declare type DrawerLayoutAndroid = typeof DrawerLayoutAndroid;
25export declare const FlatList: React.ForwardRefExoticComponent<RNFlatListProps<any> & React.RefAttributes<RNFlatList<any>>>;
26export declare type FlatList<ItemT> = React.ComponentType<RNFlatListProps<ItemT> & NativeViewGestureHandlerProps & React.RefAttributes<any>> & {
27 scrollToEnd: (params?: {
28 animated?: boolean;
29 }) => void;
30 scrollToIndex: (params: {
31 animated?: boolean;
32 index: number;
33 viewOffset?: number;
34 viewPosition?: number;
35 }) => void;
36 scrollToItem: (params: {
37 animated?: boolean;
38 item: ItemT;
39 viewPosition?: number;
40 }) => void;
41 scrollToOffset: (params: {
42 animated?: boolean;
43 offset: number;
44 }) => void;
45};