-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.js
71 lines (67 loc) · 1.44 KB
/
App.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
import React from 'react';
import {
SafeAreaView,
StyleSheet,
TextInput,
TouchableOpacity,
Text,
Alert,
} from 'react-native';
import TouchId from 'react-native-touch-id';
export default function auth() {
TouchId.authenticate('Por favor, se autentique!', {
title: 'Autentique-se',
})
.then(() => {
Alert.alert('Autenticação realizada com sucesso!');
})
.catch(() => {
Alert.alert('A autenticação falhou. Por favor, digite sua senha!');
});
return (
<SafeAreaView style={styles.container}>
<TextInput
style={styles.input}
placeholder="Email"
placeholderTextColor="#444"
/>
<TextInput
style={styles.input}
placeholder="Senha"
placeholderTextColor="#444"
/>
<TouchableOpacity style={styles.button}>
<Text>Entrar</Text>
</TouchableOpacity>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#19181f',
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
input: {
width: 200,
height: 45,
borderWidth: 2,
borderColor: '#7159c1',
borderRadius: 5,
marginBottom: 10,
padding: 10,
},
button: {
width: 200,
height: 45,
borderWidth: 2,
borderColor: '#7159c1',
backgroundColor: '#7159c1',
borderRadius: 5,
marginBottom: 10,
padding: 10,
justifyContent: 'center',
alignItems: 'center',
},
});