-
Notifications
You must be signed in to change notification settings - Fork 1
/
App-before-navigation.tsx
87 lines (82 loc) · 2.28 KB
/
App-before-navigation.tsx
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import React from 'react';
import { View, StyleSheet, KeyboardAvoidingView, ScrollView, Image, SafeAreaView, Platform } from 'react-native';
import Component1 from './src/components/Component1';
import Component2 from './src/components/Component2';
import Component4 from './src/components/Component4';
import Component5 from './src/components/Component5';
import Component6 from './src/components/Component6';
import Component7 from './src/components/Component7';
import Component8 from './src/components/Component8';
import Component9 from './src/components/Component9';
//Let's create a simple separator component that will only be used here in App.tsx
const Separator: React.FC = () => {
return <View style={styles.separator}></View>
}
const App: React.FC = () => {
return (
<SafeAreaView style={styles.container}>
<KeyboardAvoidingView behavior={Platform.OS == "ios"? "padding" : "height"} style={styles.container}>
<ScrollView>
<View style={styles.screenHeader}>
<Image style={styles.logo}
source={require('./src/img/PAU-Logo-Website.png')}
/>
</View>
<View style={styles.screenBody}>
<Component1 />
<Separator/>
<Component2 name='Pius'/>
<Component2 />
<Separator/>
<Component4 />
<Separator/>
<Component5/>
<Separator/>
<Component6/>
<Separator/>
<Component7/>
<Separator/>
<Component9/>
</View>
</ScrollView>
</KeyboardAvoidingView>
</SafeAreaView>
);
/*
return(
<SafeAreaView style={[styles.container, {paddingTop: 30}]}>
<Component8 />
</SafeAreaView>
);
*/
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'lightblue',
alignItems: 'stretch',
justifyContent: 'center',
padding: 15
},
separator: {
backgroundColor: '#eee',
height: 3,
width: '100%'
},
screenHeader: {
flex: 1,
paddingTop: 27,
justifyContent: 'center',
backgroundColor: 'darkblue'
},
screenBody: {
flex: 6,
justifyContent: 'center',
},
logo:{
alignSelf:'center',
width: 200,
height: 82
}
});
export default App;