import { StyleProp, ViewStyle } from 'react-native'; import { BottomNavigation } from 'react-native-paper'; import { NavigationRoute, NavigationState, NavigationScreenProp, NavigationParams, NavigationScreenConfig, SupportedThemes, } from 'react-navigation'; export type NavigationTabState = NavigationState; export type NavigationTabProp< State = NavigationRoute, Params = NavigationParams > = NavigationScreenProp & { jumpTo(routeName: string, key?: string): void; }; export type NavigationMaterialBottomTabOptions = { title?: string; tabBarLabel?: React.ReactNode; tabBarBadge?: boolean | number | string; tabBarVisible?: boolean; tabBarAccessibilityLabel?: string; tabBarTestID?: string; tabBarColor?: string; tabBarIcon?: | React.ReactNode | ((props: { focused: boolean; tintColor?: string; horizontal?: boolean; }) => React.ReactNode); tabBarOnPress?: (props: { navigation: NavigationTabProp; defaultHandler: () => void; }) => void; }; export type NavigationMaterialBottomTabConfig = Partial< Omit< React.ComponentProps, | 'navigationState' | 'onIndexChange' | 'onTabPress' | 'renderScene' | 'renderLabel' | 'renderIcon' | 'getAccessibilityLabel' | 'getBadge' | 'getColor' | 'getLabelText' | 'getTestID' > > & { activeColorLight?: string; activeColorDark?: string; inactiveColorLight?: string; inactiveColorDark?: string; barStyleLight?: StyleProp; barStyleDark?: StyleProp; }; export type NavigationTabScreenProps< Params = NavigationParams, ScreenProps = unknown > = { theme: SupportedThemes; navigation: NavigationTabProp; screenProps: ScreenProps; }; export type NavigationMaterialBottomTabScreenComponent< Params = NavigationParams, ScreenProps = unknown > = React.ComponentType> & { navigationOptions?: NavigationScreenConfig< NavigationMaterialBottomTabOptions, NavigationTabProp, ScreenProps >; };