浏览代码

Upload files to ''

dayanlee.deleon 2 年前
父节点
当前提交
4c1c514c83
共有 1 个文件被更改,包括 44 次插入0 次删除
  1. 44
    0
      header.js

+ 44
- 0
header.js 查看文件

@@ -0,0 +1,44 @@
1
+import React from 'react';
2
+import {StyleSheet, Text, View, Image} from 'react-native';
3
+import { DrawerActions } from 'react-navigation';
4
+import {MaterialIcons} from '@expo/vector-icons';
5
+
6
+export default function Header({navigation}) {
7
+    const openMenu = () => {
8
+        navigation.openDrawer()
9
+    }
10
+    return (
11
+        <View style={styles.header}>
12
+            
13
+            <View>
14
+                <Image 
15
+                style={styles.tinyLogo}
16
+                source={require('../assets/logo.png')} />
17
+            </View>
18
+        </View>
19
+    );
20
+}
21
+
22
+const styles = StyleSheet.create({
23
+    header: {
24
+        width: '100%',
25
+        height: '100%',
26
+        flexDirection: 'row',
27
+        alignItems: 'center',
28
+        justifyContent: 'center',
29
+    },
30
+    headerText: {
31
+        fontweight: 'bold',
32
+        fontSize: 20,
33
+        color: '#333',
34
+        letterSpacing: 1,
35
+    },
36
+    icon: {
37
+        position: 'absolute',
38
+        left: -75
39
+    },
40
+    tinyLogo: {
41
+        width:120,
42
+        height:35,
43
+    },
44
+})