DefinitelyTyped/types/react-navigation/react-navigation-tests.tsx
Jeremi Stadler f113c7a5e7 [React-Navigation] Add tabConfig tests
Specifically to test the tabBarComponent property
2017-05-29 14:34:58 +02:00

47 lines
876 B
TypeScript

import * as React from 'react';
import { View } from 'react-native';
import {
addNavigationHelpers,
StackNavigator,
TabNavigatorScreenOptions,
TabNavigatorConfig,
TabBarTop,
TabBarBottom,
} from 'react-navigation';
const Start = (
<View />
);
export const AppNavigator = StackNavigator({
StartImage: {
path: 'startImage',
screen: Start,
},
}, {
initialRouteName: 'StartImage',
});
const Router = (props: any) => (
<AppNavigator
navigation={
addNavigationHelpers({
dispatch: {},
state: {},
})
}
/>
);
const tabNavigatorScreenOptions: TabNavigatorScreenOptions = {
title: 'title',
tabBarVisible: true,
tabBarIcon: <View />,
tabBarLabel: 'label',
}
const tabNavigatorConfig: TabNavigatorConfig = {
lazy: true,
tabBarComponent: TabBarTop,
}