UNPKG

1.77 kBTypeScriptView Raw
1import * as React from 'react';
2import { type PressableAndroidRippleConfig, type StyleProp, type ViewStyle } from 'react-native';
3import { type Props as IndicatorProps } from './TabBarIndicator';
4import { type Props as TabBarItemProps } from './TabBarItem';
5import type { Event, LocaleDirection, NavigationState, Route, Scene, SceneRendererProps, TabDescriptor } from './types';
6export type Props<T extends Route> = SceneRendererProps & {
7 navigationState: NavigationState<T>;
8 scrollEnabled?: boolean;
9 bounces?: boolean;
10 activeColor?: string;
11 inactiveColor?: string;
12 pressColor?: string;
13 pressOpacity?: number;
14 options?: Record<string, TabDescriptor<T>>;
15 renderIndicator?: (props: IndicatorProps<T>) => React.ReactNode;
16 renderTabBarItem?: (props: TabBarItemProps<T> & {
17 key: string;
18 }) => React.ReactElement;
19 onTabPress?: (scene: Scene<T> & Event) => void;
20 onTabLongPress?: (scene: Scene<T>) => void;
21 tabStyle?: StyleProp<ViewStyle>;
22 indicatorStyle?: StyleProp<ViewStyle>;
23 indicatorContainerStyle?: StyleProp<ViewStyle>;
24 contentContainerStyle?: StyleProp<ViewStyle>;
25 style?: StyleProp<ViewStyle>;
26 direction?: LocaleDirection;
27 gap?: number;
28 testID?: string;
29 android_ripple?: PressableAndroidRippleConfig;
30};
31export declare function TabBar<T extends Route>({ renderIndicator, gap, scrollEnabled, jumpTo, navigationState, position, activeColor, bounces, contentContainerStyle, inactiveColor, indicatorContainerStyle, indicatorStyle, onTabLongPress, onTabPress, pressColor, pressOpacity, direction, renderTabBarItem, style, tabStyle, layout: propLayout, testID, android_ripple, options, }: Props<T>): import("react/jsx-runtime").JSX.Element;
32//# sourceMappingURL=TabBar.d.ts.map
\No newline at end of file