1 | import * as React from 'react';
|
2 | import { NavigationRoute, NavigationRouteConfigMap, CreateNavigatorConfig, NavigationTabRouterConfig } from 'react-navigation';
|
3 | import { NavigationTabProp, NavigationCommonTabOptions, SceneDescriptorMap } from '../types';
|
4 | declare type RouteConfig<Options> = NavigationRouteConfigMap<Options, NavigationTabProp<NavigationRoute, any>>;
|
5 | declare type CommonProps = {
|
6 | navigation: NavigationTabProp;
|
7 | descriptors: SceneDescriptorMap;
|
8 | screenProps?: unknown;
|
9 | };
|
10 | export declare type RenderIconProps = {
|
11 | route: NavigationRoute;
|
12 | focused: boolean;
|
13 | tintColor?: string;
|
14 | horizontal?: boolean;
|
15 | };
|
16 | export declare type NavigationViewProps = {
|
17 | getLabelText: (props: {
|
18 | route: NavigationRoute;
|
19 | }) => string | undefined;
|
20 | getAccessibilityLabel: (props: {
|
21 | route: NavigationRoute;
|
22 | }) => string | undefined;
|
23 | getTestID: (props: {
|
24 | route: NavigationRoute;
|
25 | }) => string | undefined;
|
26 | renderIcon: (props: RenderIconProps) => React.ReactNode;
|
27 | renderScene: (props: {
|
28 | route: NavigationRoute;
|
29 | }) => React.ReactNode;
|
30 | onIndexChange: (index: number) => void;
|
31 | onTabPress: (props: {
|
32 | route: NavigationRoute;
|
33 | }) => void;
|
34 | onTabLongPress: (props: {
|
35 | route: NavigationRoute;
|
36 | }) => void;
|
37 | };
|
38 | export default function createTabNavigator<Config extends {}, Options extends NavigationCommonTabOptions, Props extends NavigationViewProps & CommonProps>(TabView: React.ComponentType<Props & Config & Options>): (routes: RouteConfig<Options>, config?: CreateNavigatorConfig<Partial<Config>, NavigationTabRouterConfig, Partial<Options>, NavigationTabProp<NavigationRoute, any>>) => import("react-navigation").NavigationNavigator<any, import("react-navigation").NavigationProp<import("react-navigation").NavigationState>>;
|
39 | export {};
|