mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 09:39:18 +08:00
fix: fix header tint color not applied
This commit is contained in:
@@ -463,7 +463,12 @@ Array [
|
||||
"fontSize": 17,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
undefined,
|
||||
Array [
|
||||
Object {
|
||||
"color": undefined,
|
||||
},
|
||||
undefined,
|
||||
],
|
||||
]
|
||||
}
|
||||
>
|
||||
@@ -589,7 +594,12 @@ Array [
|
||||
"fontSize": 17,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
undefined,
|
||||
Array [
|
||||
Object {
|
||||
"color": undefined,
|
||||
},
|
||||
undefined,
|
||||
],
|
||||
]
|
||||
}
|
||||
>
|
||||
|
||||
@@ -297,7 +297,12 @@ Array [
|
||||
"fontSize": 17,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
undefined,
|
||||
Array [
|
||||
Object {
|
||||
"color": undefined,
|
||||
},
|
||||
undefined,
|
||||
],
|
||||
]
|
||||
}
|
||||
>
|
||||
@@ -627,7 +632,12 @@ Array [
|
||||
"fontSize": 17,
|
||||
"fontWeight": "600",
|
||||
},
|
||||
undefined,
|
||||
Array [
|
||||
Object {
|
||||
"color": undefined,
|
||||
},
|
||||
undefined,
|
||||
],
|
||||
]
|
||||
}
|
||||
>
|
||||
|
||||
@@ -73,7 +73,7 @@ export type HeaderOptions = {
|
||||
headerTruncatedBackTitle?: string;
|
||||
headerLeft?: (props: HeaderBackButtonProps) => React.ReactNode;
|
||||
headerLeftContainerStyle?: StyleProp<ViewStyle>;
|
||||
headerRight?: () => React.ReactNode;
|
||||
headerRight?: (props: { tintColor?: string }) => React.ReactNode;
|
||||
headerRightContainerStyle?: StyleProp<ViewStyle>;
|
||||
headerBackImage?: HeaderBackButtonProps['backImage'];
|
||||
headerPressColorAndroid?: string;
|
||||
|
||||
@@ -125,6 +125,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
|
||||
<HeaderBackButton {...props} />
|
||||
),
|
||||
headerBackground,
|
||||
headerTintColor,
|
||||
// @ts-ignore
|
||||
headerStatusBarHeight = getStatusBarHeight(layout.width > layout.height),
|
||||
headerRight: right,
|
||||
@@ -186,6 +187,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
|
||||
onLabelLayout: this.handleLeftLabelLayout,
|
||||
screenLayout: layout,
|
||||
titleLayout,
|
||||
tintColor: headerTintColor,
|
||||
})}
|
||||
</Animated.View>
|
||||
) : null}
|
||||
@@ -204,7 +206,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
|
||||
<HeaderTitle
|
||||
onLayout={this.handleTitleLayout}
|
||||
allowFontScaling={titleAllowFontScaling}
|
||||
style={customTitleStyle}
|
||||
style={[{ color: headerTintColor }, customTitleStyle]}
|
||||
>
|
||||
{currentTitle}
|
||||
</HeaderTitle>
|
||||
@@ -214,7 +216,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
|
||||
<Animated.View
|
||||
style={[styles.right, rightButtonStyle, rightContainerStyle]}
|
||||
>
|
||||
{right()}
|
||||
{right({ tintColor: headerTintColor })}
|
||||
</Animated.View>
|
||||
) : null}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user