Closed thegitparticle closed 4 years ago
Solution: Just change the default theme settings of Navigation Container.
Can you explain it just with a bit of code for help ;-;
@KeneePatel have not been working on that project since the start of the year. I really need to look into old project properly to tell how
@KeneePatel
import { DefaultTheme } from '@react-navigation/native';
import colors from '../Config/colors';
export default {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: colors.primary,
background: colors.background, // provide same color as your component have, in this way you will remove white
color or what else color that appears after providing borderRadis.
card: colors.white,
text: colors.fontDark,
},
}
to know about the Theme goto-----> https://reactnavigation.org/docs/themes/
Bug
When I try to add some curvature to the edges of the Tab Bar (so it doesn't look like a perfect rectangle), the Tab Bar does bend the edges but the background of the Tab Bar has a white background which ruins the whole point.
The only custom options I added to the given implementation in the README file is adding of these Tabbar options -
tabBarOptions={{ style: { backgroundColor: '#181818', borderRadius: 30, borderTopWidth: 2, borderColor: 'rgba(255, 255, 255, 0.1)', }, }}
FYI: Removing everything else from the above tabBarOptions, except for borderRadius also produces the same issue of white background.
Here is the image of how it looks now.
Environment info
Steps To Reproduce
Describe what you expected to happen:
Reproducible sample code
<TabHere.Navigator initialRouteName="Clubs" tabBarOptions={{ style: { backgroundColor: '#181818', borderRadius: 30, borderTopWidth: 2, borderColor: 'rgba(255, 255, 255, 0.1)', }, }} tabBar={(props) => ( <AnimatedTabBar tabs={tabs} preset="flashy" keyboardHidesTabBar={true} iconSize={20} itemContainerWidth="fill" {...props} /> )}>