UNPKG

1.53 kBTypeScriptView Raw
1import React from 'react';
2import { default as RN, Animated, ScrollView } from 'react-native';
3import { PropsType as BasePropsType } from './PropsType';
4import { Tabs as Component, StateType as BaseStateType } from './Tabs.base';
5import { DefaultTabBar } from './DefaultTabBar';
6import Styles from './Styles.native';
7export interface PropsType extends BasePropsType {
8 children?: any;
9 style?: RN.ViewStyle;
10 styles?: typeof Styles;
11 keyboardShouldPersistTaps?: boolean;
12}
13export interface StateType extends BaseStateType {
14 scrollX: Animated.Value;
15 scrollValue: Animated.Value;
16 containerWidth: number;
17}
18export declare class Tabs extends Component<PropsType, StateType> {
19 static DefaultTabBar: typeof DefaultTabBar;
20 static defaultProps: PropsType;
21 AnimatedScrollView: ScrollView;
22 scrollView: {
23 _component: ScrollView;
24 };
25 constructor(props: PropsType);
26 componentDidMount(): void;
27 onScroll: (evt?: RN.NativeSyntheticEvent<RN.NativeScrollEvent> | undefined) => void;
28 setScrollView: (sv: any) => void;
29 renderContent: (getSubElements?: (defaultPrefix?: string, allPrefix?: string) => {
30 [key: string]: React.ReactNode;
31 }) => JSX.Element;
32 onMomentumScrollEnd: (e: RN.NativeSyntheticEvent<RN.NativeScrollEvent>) => void;
33 goToTab(index: number, force?: boolean, animated?: boolean | undefined): boolean;
34 handleLayout: (e: RN.LayoutChangeEvent) => void;
35 scrollTo: (index: number, animated?: boolean) => void;
36 render(): JSX.Element;
37}