UNPKG

1.57 kBTypeScriptView Raw
1import * as React from 'react';
2import { type StyleProp, type ViewStyle } from 'react-native';
3import type { Layout, LocaleDirection, NavigationState, PagerProps, Route, SceneRendererProps, TabDescriptor } from './types';
4export type Props<T extends Route> = Omit<PagerProps, 'layoutDirection'> & {
5 onIndexChange: (index: number) => void;
6 navigationState: NavigationState<T>;
7 renderLazyPlaceholder?: (props: {
8 route: T;
9 }) => React.ReactNode;
10 renderTabBar?: (props: SceneRendererProps & {
11 navigationState: NavigationState<T>;
12 options: Record<string, TabDescriptor<T>> | undefined;
13 }) => React.ReactNode;
14 tabBarPosition?: 'top' | 'bottom';
15 initialLayout?: Partial<Layout>;
16 lazy?: ((props: {
17 route: T;
18 }) => boolean) | boolean;
19 lazyPreloadDistance?: number;
20 direction?: LocaleDirection;
21 pagerStyle?: StyleProp<ViewStyle>;
22 style?: StyleProp<ViewStyle>;
23 renderScene: (props: SceneRendererProps & {
24 route: T;
25 }) => React.ReactNode;
26 options?: Record<string, TabDescriptor<T>>;
27 commonOptions?: TabDescriptor<T>;
28};
29export declare function TabView<T extends Route>({ onIndexChange, navigationState, renderScene, initialLayout, keyboardDismissMode, lazy, lazyPreloadDistance, onSwipeStart, onSwipeEnd, renderLazyPlaceholder, renderTabBar, pagerStyle, style, direction, swipeEnabled, tabBarPosition, animationEnabled, overScrollMode, options: sceneOptions, commonOptions, }: Props<T>): import("react/jsx-runtime").JSX.Element;
30//# sourceMappingURL=TabView.d.ts.map
\No newline at end of file