reuse styles (#3725)

This commit is contained in:
Vojtech Novak
2018-03-13 21:05:21 +01:00
parent 2e803d725b
commit 8a84f8523b
2 changed files with 5 additions and 2 deletions

View File

@@ -479,7 +479,7 @@ class Header extends React.PureComponent {
return (
<SafeAreaView forceInset={forceInset} style={containerStyles}>
<View style={StyleSheet.absoluteFill}>{options.headerBackground}</View>
<View style={{ flex: 1 }}>{appBar}</View>
<View style={styles.flexOne}>{appBar}</View>
</SafeAreaView>
);
}
@@ -575,6 +575,9 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
},
flexOne: {
flex: 1,
},
});
export default withOrientation(Header);

View File

@@ -393,7 +393,7 @@ class StackViewLayout extends React.Component {
if (headerMode === 'screen') {
return (
<View style={styles.container}>
<View style={{ flex: 1 }}>
<View style={styles.scenes}>
<SceneView
screenProps={screenProps}
navigation={navigation}