Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 3c4b0eb

Browse files
committed
feat: add headerBackTitleVisible option to navigation options
1 parent 6252b36 commit 3c4b0eb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export type HeaderOptions = {
7070
headerBackAllowFontScaling?: boolean;
7171
headerBackTitle?: string;
7272
headerBackTitleStyle?: StyleProp<TextStyle>;
73+
headerBackTitleVisible?: boolean;
7374
headerTruncatedBackTitle?: string;
7475
headerLeft?: (props: HeaderBackButtonProps) => React.ReactNode;
7576
headerLeftContainerStyle?: StyleProp<ViewStyle>;
@@ -106,7 +107,6 @@ export type NavigationStackOptions = HeaderOptions & {
106107
export type NavigationConfig = TransitionPreset & {
107108
mode: 'card' | 'modal';
108109
headerMode: HeaderMode;
109-
headerBackTitleVisible?: boolean;
110110
cardShadowEnabled?: boolean;
111111
cardOverlayEnabled?: boolean;
112112
transparentCard?: boolean;

src/views/Header/HeaderSegment.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
131131
headerRight: right,
132132
headerBackImage: backImage,
133133
headerBackTitle: leftLabel,
134+
headerBackTitleVisible,
134135
headerTruncatedBackTitle: truncatedLabel,
135136
headerPressColorAndroid: pressColorAndroid,
136137
headerBackAllowFontScaling: backAllowFontScaling,
@@ -181,6 +182,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
181182
pressColorAndroid,
182183
allowFontScaling: backAllowFontScaling,
183184
onPress: onGoBack,
185+
labelVisible: headerBackTitleVisible,
184186
label: leftLabel !== undefined ? leftLabel : previousTitle,
185187
truncatedLabel,
186188
labelStyle: [leftLabelStyle, customLeftLabelStyle],

0 commit comments

Comments
 (0)