Banner.js 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* @flow */
  2. import React from 'react';
  3. import { Image, Platform, StyleSheet, Text, View } from 'react-native';
  4. import { SafeAreaView } from 'react-navigation';
  5. const Banner = () => (
  6. <SafeAreaView
  7. style={styles.bannerContainer}
  8. forceInset={{ top: 'always' }}
  9. >
  10. <View style={styles.banner}>
  11. <Image source={require('./assets/NavLogo.png')} style={styles.image} />
  12. <Text style={styles.title}>React Navigation Examples</Text>
  13. </View>
  14. </SafeAreaView>
  15. );
  16. export default Banner;
  17. const styles = StyleSheet.create({
  18. bannerContainer: {
  19. backgroundColor: '#673ab7',
  20. paddingTop: 20,
  21. },
  22. banner: {
  23. flexDirection: 'row',
  24. alignItems: 'center',
  25. padding: 16,
  26. },
  27. image: {
  28. width: 36,
  29. height: 36,
  30. resizeMode: 'contain',
  31. tintColor: '#fff',
  32. margin: 8,
  33. },
  34. title: {
  35. fontSize: 18,
  36. fontWeight: '200',
  37. color: '#fff',
  38. margin: 8,
  39. },
  40. });