Dave Pack 185289ad66 Add iPhone X SafeAreaView (#2833)
* Add SafeAreaView - JS only version

* Add SafeAreaView

* Looking pretty good

* Small refactor

* Remove console.log

* Fix merge conflict with Header flow types.

* Fix conflict with itemsContainerStyle.

* Fix merge conflict.

* Fix merge conflict, yarn and package.json from fixflow

* Fix merge conflict, navigation playground yarn.lock and package.json with fixflow

* Now it can work on lower versions of RN

* Snapshots merge conflict.

* Update DrawerNavigator snapshot.

* Fix conflict with iconContainerStyle

* Add support for correct status bar height on iPad.

* Update jest snapshots.

* Update StackNavigator snapshot.

* Use modulo instead of while

* Fix landscape tab bar width on < iOS 11
2017-10-31 13:33:40 -05:00

45 lines
901 B
JavaScript

/* @flow */
import React from 'react';
import { Image, Platform, StyleSheet, Text, View } from 'react-native';
import { SafeAreaView } from 'react-navigation';
const Banner = () => (
<SafeAreaView
style={styles.bannerContainer}
forceInset={{ vertical: 'never' }}
>
<View style={styles.banner}>
<Image source={require('./assets/NavLogo.png')} style={styles.image} />
<Text style={styles.title}>React Navigation Examples</Text>
</View>
</SafeAreaView>
);
export default Banner;
const styles = StyleSheet.create({
bannerContainer: {
backgroundColor: '#673ab7',
},
banner: {
flexDirection: 'row',
alignItems: 'center',
padding: 16,
},
image: {
width: 36,
height: 36,
resizeMode: 'contain',
tintColor: '#fff',
margin: 8,
},
title: {
fontSize: 18,
fontWeight: '200',
color: '#fff',
margin: 8,
},
});