-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotp.js
94 lines (89 loc) · 2.57 KB
/
otp.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
82
83
84
85
86
87
88
89
90
91
92
93
94
import React, { useState } from 'react';
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, TouchableOpacity, ScrollView } from 'react-native';
import { SafeAreaView } from 'react-native-safe-area-context';
import { Header, OtpInput } from './components';
import { colors } from './theme/colors';
import { moderateScale } from 'react-native-size-matters';
export default OTP = () => {
return (
<SafeAreaView style={styles.container} forceInset={{ top: "always" }}>
<StatusBar style="dark" />
<ScrollView style={{
paddingTop: moderateScale(60)
}}>
<Header
title="Verify Token"
text="An OTP was sent to your email/phone number.
Please enter the code below"
/>
<View style={styles.otpBox}>
<OtpInput />
</View>
<View style={styles.footer}>
<TouchableOpacity
style={styles.btn}
onPress={() => { }}
activeOpacity={0.7}
>
<Text style={styles.btnText}>
Continue
</Text>
</TouchableOpacity>
<Text style={styles.footerText}>
<Text style={styles.link}>Re-send Code</Text>
</Text>
</View>
</ScrollView>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
inputBox: {
paddingHorizontal: "5%",
marginTop: "5%"
},
inputStyle: {
marginBottom: "8%"
},
otpBox: {
marginTop: "14%"
},
passwordStyle: {
color: colors.primary,
fontSize: moderateScale(14),
fontWeight: "600"
},
footerText: {
color: "#A1A5AC",
fontSize: moderateScale(14),
fontWeight: "400",
textAlign: "center"
},
link: {
color: colors.primary,
fontWeight: "bold"
},
btn: {
backgroundColor: colors.primary,
justifyContent: "center",
alignItems: "center",
paddingVertical: "5%",
borderRadius: 10,
marginTop: "10%",
marginBottom: "10%"
},
btnText: {
color: "white",
fontSize: moderateScale(16),
fontWeight: "600"
},
footer: {
paddingHorizontal: "5%",
marginTop: "4%"
}
});