-1
Good evening guys, I’m having trouble with header stylization, because I created a main screen and I believed in it and imported the tabs. In this same file I call 3 screen tabs (business, contact, email) and each has its own functionalities
He chanted importing an image of the representation of where I wanted to change:
Here’s my code from where I’m having trouble solving
import React from 'react';
import { SafeAreaView } from 'react-native';
import { createAppContainer } from 'react-navigation';
import { createMaterialTopTabNavigator, MaterialTopTabBar } from 'react-navigation-tabs';
import Business from './MenuTabBusiness/IndexScreen';
import Contact from './MenuTabContact/IndexScreen';
import Email from './MenuTabEmail/IndexScreen';
import colors from '../../constants/Colors';
function SafeAreaMaterialTopTabBar(props) {
return (
<SafeAreaView>
<MaterialTopTabBar {...props} />
</SafeAreaView>
);
}
const mainNavigation = createMaterialTopTabNavigator(
{
'Negócios': { screen: Business },
'Contato': { screen: Contact },
'E-mail': { screen: Email },
},
{
tabBarComponent: SafeAreaMaterialTopTabBar,
tabBarOptions: {
tabStyle: {
backgroundColor: colors.tintColor
},
},
},
);
export default createAppContainer(mainNavigation)
I’m starting with React-On, and I’m a little lost to solve that part of the header...
Thank you!
So, neither of those two models, it worked, I tried to create a component equal to the second option, and yet it kept that bar up there you know!? I created a Component, and called through navigation, it creates tabs, but does not style the header (white part I mentioned in the question)
– Nathan