static navigationOptions = ({ navigation }: { navigation: any }) => ({
headerTitle: "My Account",
headerTitleStyle: {
color: GlobalColors.white,
fontStyle: "normal",
},
headerStyle: {
elevation: 0,
shadowOpacity: 0,
backgroundColor: GlobalColors.themeColor
},
headerRight:
<View style={{ paddingRight: 20 }}>
<Text style={{color : GlobalColors.white}}>{next}</Text>
</View>,
headerLeft : {isFirst && ( <View style={{ paddingLeft: 16 }}>
<Icon
name="menu"
size={30}
color={GlobalColors.white}
onPress={() => navigation.dispatch(DrawerActions.openDrawer())} />
</View>)}
})
如何显示和隐藏标题中的图标。组件将从两个组件调用,其中每个组件的标题栏都有不同的图标,因此我想更改该图标。