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

Commit

Permalink
fix: don't ignore headerLeft if specified. fixes #164
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Aug 18, 2019
1 parent 32b7ec8 commit c9b2c4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/stack/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export type SceneDescriptorMap = { [key: string]: SceneDescriptor | undefined };

export type HeaderBackButtonProps = {
disabled?: boolean;
onPress: () => void;
onPress?: () => void;
pressColorAndroid?: string;
backImage?: (props: { tintColor: string }) => React.ReactNode;
tintColor?: string;
Expand Down
8 changes: 4 additions & 4 deletions packages/stack/src/views/Header/HeaderSegment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export default class HeaderSegment extends React.Component<Props, State> {
leftLabel: previousTitle,
onGoBack,
headerTitle,
headerLeft: left = (props: HeaderBackButtonProps) => (
<HeaderBackButton {...props} />
),
headerLeft: left = onGoBack
? (props: HeaderBackButtonProps) => <HeaderBackButton {...props} />
: undefined,
// @ts-ignore
headerStatusBarHeight = getStatusBarHeight(layout.width > layout.height),
headerTransparent,
Expand Down Expand Up @@ -295,7 +295,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
style={{ height: headerStatusBarHeight }}
/>
<View pointerEvents="box-none" style={styles.content}>
{onGoBack ? (
{left ? (
<Animated.View
pointerEvents="box-none"
style={[styles.left, leftButtonStyle, leftContainerStyle]}
Expand Down

0 comments on commit c9b2c4d

Please sign in to comment.