@@ -56,10 +56,6 @@ export const getDefaultHeaderHeight = (layout: Layout) => {
5656} ;
5757
5858export default class HeaderSegment extends React . Component < Props , State > {
59- static defaultProps = {
60- headerBackground : ( ) => < HeaderBackground /> ,
61- } ;
62-
6359 state : State = { } ;
6460
6561 private handleTitleLayout = ( e : LayoutChangeEvent ) => {
@@ -124,10 +120,11 @@ export default class HeaderSegment extends React.Component<Props, State> {
124120 headerLeft : left = ( props : HeaderBackButtonProps ) => (
125121 < HeaderBackButton { ...props } />
126122 ) ,
127- headerBackground ,
123+ headerStatusBarHeight = getStatusBarHeight ( layout . width > layout . height ) ,
128124 headerTintColor,
125+ headerBackground,
126+ headerBackgroundStyle,
129127 // @ts -ignore
130- headerStatusBarHeight = getStatusBarHeight ( layout . width > layout . height ) ,
131128 headerRight : right ,
132129 headerBackImage : backImage ,
133130 headerBackTitle : leftLabel ,
@@ -163,14 +160,16 @@ export default class HeaderSegment extends React.Component<Props, State> {
163160
164161 return (
165162 < React . Fragment >
166- { headerBackground ? (
167- < Animated . View
168- pointerEvents = "none"
169- style = { [ StyleSheet . absoluteFill , backgroundStyle ] }
170- >
171- { headerBackground ( ) }
172- </ Animated . View >
173- ) : null }
163+ < Animated . View
164+ pointerEvents = "none"
165+ style = { [ StyleSheet . absoluteFill , backgroundStyle ] }
166+ >
167+ { headerBackground ? (
168+ headerBackground ( )
169+ ) : (
170+ < HeaderBackground style = { headerBackgroundStyle } />
171+ ) }
172+ </ Animated . View >
174173 < View pointerEvents = "none" style = { { height : headerStatusBarHeight } } />
175174 < View pointerEvents = "box-none" style = { styles . container } >
176175 { onGoBack ? (
0 commit comments