diff --git a/packages/stack/src/views/Header/HeaderContainer.tsx b/packages/stack/src/views/Header/HeaderContainer.tsx index 911b8379..a18378e2 100644 --- a/packages/stack/src/views/Header/HeaderContainer.tsx +++ b/packages/stack/src/views/Header/HeaderContainer.tsx @@ -84,13 +84,15 @@ export default function HeaderContainer({ isFocused ? 'auto' : 'no-hide-descendants' } style={[ - { height: getDefaultHeaderHeight(layout) }, mode === 'float' ? StyleSheet.absoluteFill : null, + mode === 'screen' && options.header !== undefined + ? null + : { height: getDefaultHeaderHeight(layout) }, options.headerStyle, ]} > {options.header !== undefined ? ( - options.header == null ? null : ( + options.header === null ? null : ( options.header(props) ) ) : ( diff --git a/packages/stack/src/views/Header/HeaderSegment.tsx b/packages/stack/src/views/Header/HeaderSegment.tsx index 747f7a51..43943e63 100644 --- a/packages/stack/src/views/Header/HeaderSegment.tsx +++ b/packages/stack/src/views/Header/HeaderSegment.tsx @@ -125,7 +125,8 @@ export default class HeaderSegment extends React.Component { ), headerBackground, - headerStatusBarHeight, + // @ts-ignore + headerStatusBarHeight = getStatusBarHeight(layout.width > layout.height), headerRight: right, headerBackImage: backImage, headerBackTitle: leftLabel, @@ -168,16 +169,8 @@ export default class HeaderSegment extends React.Component { {headerBackground()} ) : null} - layout.height), - }} - /> - + + {onGoBack ? (