import React from 'react';
import { createMaterialTopTabNavigator, SafeAreaView, MaterialTopTabBar } from 'react-navigation';
const SafeAreaMaterialTopTabBar = ({ ...props }) => (
<SafeAreaView>
<MaterialTopTabBar {...props} />
</SafeAreaView>
);
const options = {
tabBarComponent: props => (<SafeAreaMaterialTopTabBar {...props} />),
};
const RentalsTopTabNavigator = createMaterialTopTabNavigator({
[Routes.ROUTE_1]: {
screen: Screen1,
navigationOptions: {
title: 'Tab1',
},
},
[Routes.ROUTE_2]: {
screen: Screen2,
navigationOptions: {
title: 'Tab 2',
},
},
}, options);