-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSecureView.js
81 lines (73 loc) · 1.8 KB
/
SecureView.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"use strict";
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableHighlight,
TextInput,
Button
} from 'react-native';
var LoginView = require("./loginView");
class SecureView extends Component {
constructor(props) {
super(props);
this.state = {
username: this.props.username,
password: this.props.password
};
}
render() {
return (
<View style={styles.container}>
<Text style={styles.heading} accessibilityLabel="textViewUsername">
Welcome {this.props.username}!
</Text>
<Text style={styles.subheading} accessibilityLabel="textViewPassword">
Your password is {this.props.password}
</Text>
<Button
accessibilityLabel="buttonLogout"
onPress={(this.onLogOffButtonPressed.bind(this))}
style={styles.button}
title="Log out" />
</View>
);
}
onLogOffButtonPressed() {
this.props.navigator.popToTop();
}
};
var styles = StyleSheet.create({
container: {
padding: 30,
marginTop: 65,
alignItems: "center"
},
heading: {
marginBottom: 20,
fontSize: 18,
textAlign: "center",
color: "#656565"
},
subheading: {
color: "#cccccc"
},
button: {
height: 50,
flex: 1,
backgroundColor: "#555555",
borderColor: "#555555",
borderWidth: 1,
borderRadius: 8,
marginTop: 10,
justifyContent: "center"
},
buttonText: {
fontSize: 18,
color: "#ffffff",
alignSelf: "center"
},
});
module.exports = SecureView;