Кто-нибудь знает, как стилизовать нижнюю панель вкладок, чтобы было что-то подобное?
Я могу спроектировать каждый элемент, а также спроектировать всю нижнюю панель, чтобы добавить радиус слева и справа, но самая сложная часть - это небольшая выпуклость над значком камеры, я не знаю, как это сделать.
Мой файл навигации выглядит так:
const TabNavigator = createMaterialBottomTabNavigator(
{
Home: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({tintColor}) => (tintColor === Color.primary ?
<Image source={home_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
:
<Image source={home_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
),
}
},
Cart2: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({tintColor}) => (tintColor === Color.primary ?
<Image source={ranking_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
:
<Image source={ranking_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
),
}
},
Cart3: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({tintColor}) => (tintColor === Color.primary ?
<Image source={photo_icon} resizeMode="contain"
style={{
width: 25,
height: 25,
position: 'absolute',
top: -10,
tintColor: tintColor,
marginBottom: 20
}}/>
:
<Image source={photo_icon} resizeMode="contain"
style={{width: 25, height: 25, tintColor: tintColor}}/>
),
}
},
Cart4: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({tintColor}) => (tintColor === Color.primary ?
<Image source={gallery_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
:
<Image source={gallery_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
),
}
},
Cart5: {
screen: HomeScreen,
navigationOptions: {
tabBarIcon: ({tintColor}) => (tintColor === Color.primary ?
<Image source={mission_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
:
<Image source={mission_icon} resizeMode="contain"
style={{width: 20, height: 20, tintColor: tintColor}}/>
),
}
},
},
{
initialRouteName: "Home",
activeColor: Color.primary,
barStyle: {
backgroundColor: Color.white,
borderTopLeftRadius: 30,
borderTopRightRadius: 30,
borderBottomStartRadius: 30,
borderBottomEndRadius: 30,
overflow: 'hidden'
},
},
);
export default createAppContainer(TabNavigator)
Я использую эту библиотеку material-bottom-tabs с Expo