-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeader.js
62 lines (59 loc) · 1.44 KB
/
Header.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';
import {Image,Touchable} from '.'
import { CloseApp } from "./System.js";
export default function Header({ title, headerButtonRight }) {
return (
<>
<View style={styles.statusBar}></View>
<View style={styles.header}>
<View
style={{
flex: 1,
justifyContent: "space-between",
alignItems: "flex-start",
flexDirection: "row",
paddingHorizontal: 36,
paddingVertical: 14,
}}
>
{typeof headerButton != null ? headerButtonRight : <></>}
<Text style={styles.headerText}>{title}</Text>
<Touchable
onPress={() => {
console.log("closing.");
CloseApp();
}}
>
<Image
style={{ width: 27, height: 27 }}
source={{
uri: "file:///app/KPPMainApp/res/KPPUIChrome/Close.svg",
}}
/>
</Touchable>
</View>
</View>
</>
);
}
const styles = StyleSheet.create({
statusBar: {
width: '100%',
height: 60,
},
header: {
width: '100%',
height: 60,
borderBottomWidth: 2,
borderColor: '#d7d7d7',
// justifyContent: 'space-between',
// alignItems: 'center',
},
headerText: {
flex: 1,
fontSize: 20,
textAlign: 'left',
fontWeight: '600',
},
});