-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
executable file
·80 lines (75 loc) · 1.66 KB
/
App.js
File metadata and controls
executable file
·80 lines (75 loc) · 1.66 KB
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
import React from 'react';
import { StyleSheet, Text, View, Button } from 'react-native';
export default class App extends React.Component {
_onPress() {
console.log('Pressed!');
}
render() {
var date = new Date();
return (
<View style={styles.body}>
<View style={styles.container1}>
<View>
<Text style={styles.headline}>todo</Text>
<Text style={styles.smallText}>{date.toDateString()}</Text>
</View>
</View>
<View style={styles.container2}>
<View>
<Text style={styles.smallText}>What do you want to do today?</Text>
<Text style={styles.smallText}>Start adding items to your to do list.</Text>
</View>
</View>
<View style={styles.absolute}>
<View style={styles.buttonContainer}>
<Button onPress={this._onPress} title="+ Add item" color="#000000" accessibilityLabel="Tap on Me"/>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
body: {
flex: 1,
},
smallText: {
textAlign: 'center',
color: "#828282",
},
absolute: {
position: 'absolute',
height: '100%',
width: '100%',
alignContent: 'center',
alignItems: 'center',
justifyContent: 'center',
zIndex: 50000
},
container1: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'stretch'
},
container2: {
flex: 1,
backgroundColor: '#f6f6f6',
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'stretch'
},
buttonContainer: {
backgroundColor: '#000000',
borderRadius: 50,
width: 200,
padding: 10
},
headline: {
textAlign: 'center', // <-- the magic
fontWeight: 'bold',
fontSize: 24,
marginTop: 0,
}
});