package add - otp input
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-native-async-storage/async-storage": "^2.2.0",
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
||||||
|
"@react-native-clipboard/clipboard": "^1.16.2",
|
||||||
"@react-native/new-app-screen": "0.80.0",
|
"@react-native/new-app-screen": "0.80.0",
|
||||||
"@react-navigation/elements": "^2.5.2",
|
"@react-navigation/elements": "^2.5.2",
|
||||||
"@react-navigation/native": "^7.1.14",
|
"@react-navigation/native": "^7.1.14",
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"react-native-element-dropdown": "^2.12.4",
|
"react-native-element-dropdown": "^2.12.4",
|
||||||
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
||||||
"react-native-linear-gradient": "^2.8.3",
|
"react-native-linear-gradient": "^2.8.3",
|
||||||
|
"react-native-otp-inputs": "^7.4.0",
|
||||||
"react-native-otp-textinput": "^1.1.7",
|
"react-native-otp-textinput": "^1.1.7",
|
||||||
"react-native-safe-area-context": "^5.5.0",
|
"react-native-safe-area-context": "^5.5.0",
|
||||||
"react-native-screens": "^4.11.1",
|
"react-native-screens": "^4.11.1",
|
||||||
|
|||||||
@@ -1,51 +1,37 @@
|
|||||||
// import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
// import { View, Text, Image, Alert } from 'react-native';
|
import { View, Text, Image, Alert } from 'react-native';
|
||||||
// import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
||||||
// import AsyncStorage from '@react-native-async-storage/async-storage';
|
import IMAGES from '../../../constants/Images';
|
||||||
// import { useDispatch } from 'react-redux';
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||||
|
import { useDispatch } from 'react-redux';
|
||||||
|
import CustomTextInput from '../../../components/CustomTextInput';
|
||||||
|
import CustomButton from '../../../components/CustomButton';
|
||||||
|
import Background from '../../../components/Background';
|
||||||
|
import { styles } from './style';
|
||||||
|
|
||||||
// import CustomButton from '../../../components/CustomButton';
|
const VerifyOTP = ({ navigation }) => {
|
||||||
// import IMAGES from '../../../constants/Images';
|
const [loading, setLoading] = useState(false);
|
||||||
// import { styles } from './style';
|
const dispatch = useDispatch();
|
||||||
// import Background from '../../../components/Background';
|
const [otp, setOTP] = useState('');
|
||||||
|
|
||||||
// const VerifyOTP = ({ navigation }) => {
|
|
||||||
// const [loading, setLoading] = useState(false);
|
|
||||||
// const dispatch = useDispatch();
|
|
||||||
// const otpRef = useRef();
|
|
||||||
// const [otp, setOtp] = useState('');
|
|
||||||
|
|
||||||
// return (
|
|
||||||
// <Background barcolor="light-content">
|
|
||||||
// <KeyboardAwareScrollView style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
|
||||||
// <View style={styles.logoContainer}>
|
|
||||||
// <Image style={styles.appLogo} source={IMAGES.AppLogo} />
|
|
||||||
// </View>
|
|
||||||
// <View style={styles.titleContainer}>
|
|
||||||
// <Text style={styles.titleText}>Verify OTP</Text>
|
|
||||||
// </View>
|
|
||||||
// <View style={{ marginTop: 50 }}>
|
|
||||||
|
|
||||||
// </View>
|
|
||||||
// <View style={{ marginTop: 100 }}>
|
|
||||||
// <CustomButton title={'Login'} style={styles.btnbg} textstyle={styles.btntext} />
|
|
||||||
// </View>
|
|
||||||
// </KeyboardAwareScrollView>
|
|
||||||
// </Background>
|
|
||||||
// );
|
|
||||||
// };
|
|
||||||
|
|
||||||
// export default VerifyOTP;
|
|
||||||
|
|
||||||
import { View, Text } from 'react-native'
|
|
||||||
import React from 'react'
|
|
||||||
|
|
||||||
const VerifyOTP = () => {
|
|
||||||
return (
|
return (
|
||||||
<View>
|
<Background barcolor="light-content">
|
||||||
<Text>VerifyOTP</Text>
|
<KeyboardAwareScrollView style={styles.container} contentContainerStyle={{ justifyContent: 'center', flex: 1 }}>
|
||||||
</View>
|
<View style={styles.logoContainer}>
|
||||||
)
|
<Image style={styles.appLogo} source={IMAGES.AppLogo} />
|
||||||
}
|
</View>
|
||||||
|
<View style={styles.titleContainer}>
|
||||||
|
<Text style={styles.titleText}>Verify OTP</Text>
|
||||||
|
</View>
|
||||||
|
<View style={{ marginTop: 50 }}>
|
||||||
|
|
||||||
export default VerifyOTP
|
</View>
|
||||||
|
<View style={{ marginTop: 100 }}>
|
||||||
|
<CustomButton onPress={() => navigation.navigate('VerifyOTP')} title={'Verify'} style={styles.btnbg} textstyle={styles.btntext} />
|
||||||
|
</View>
|
||||||
|
</KeyboardAwareScrollView>
|
||||||
|
</Background>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default VerifyOTP;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { GlobalTheme, Screen } from '../../../theme';
|
|||||||
export const styles = StyleSheet.create({
|
export const styles = StyleSheet.create({
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
// backgroundColor: GlobalTheme.colors.white,
|
|
||||||
paddingHorizontal: 10,
|
paddingHorizontal: 10,
|
||||||
},
|
},
|
||||||
logoContainer: {
|
logoContainer: {
|
||||||
@@ -35,7 +34,7 @@ export const styles = StyleSheet.create({
|
|||||||
otp_inputStyle: {
|
otp_inputStyle: {
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
backgroundColor: 'red',
|
backgroundColor: 'red',
|
||||||
width: ((Screen.screenWidth('80%') / 4) - 30),
|
width: 100,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
paddingVertical: 10,
|
paddingVertical: 10,
|
||||||
paddingHorizontal: 15,
|
paddingHorizontal: 15,
|
||||||
@@ -48,8 +47,8 @@ export const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
verify_otp_inputStyle: {
|
verify_otp_inputStyle: {
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
backgroundColor: PageTheme.$secondary_color_light,
|
backgroundColor: 'red',
|
||||||
width: ((Screen.screenWidth('80%') / 4) - 30),
|
width: 100,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
paddingVertical: 10,
|
paddingVertical: 10,
|
||||||
paddingHorizontal: 15,
|
paddingHorizontal: 15,
|
||||||
|
|||||||
@@ -1380,6 +1380,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
merge-options "^3.0.4"
|
merge-options "^3.0.4"
|
||||||
|
|
||||||
|
"@react-native-clipboard/clipboard@^1.16.2":
|
||||||
|
version "1.16.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@react-native-clipboard/clipboard/-/clipboard-1.16.2.tgz#d8517eea937d336b8fe1ca44e955e691d27f5ba4"
|
||||||
|
integrity sha512-VqUYwVxo7DyHMz7v2LxLMaAOSu3pKFvzpqR4jQezdH0VyaudILTTcUf7dR4TroARU/lLkTU8nZA11UniTvGVXg==
|
||||||
|
|
||||||
"@react-native-community/cli-clean@19.0.0":
|
"@react-native-community/cli-clean@19.0.0":
|
||||||
version "19.0.0"
|
version "19.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-19.0.0.tgz#1a1f3fcd77b1c6a72d27132a09590b9511d15c05"
|
resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-19.0.0.tgz#1a1f3fcd77b1c6a72d27132a09590b9511d15c05"
|
||||||
@@ -5730,6 +5735,11 @@ react-native-linear-gradient@^2.8.3:
|
|||||||
resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.8.3.tgz#9a116649f86d74747304ee13db325e20b21e564f"
|
resolved "https://registry.yarnpkg.com/react-native-linear-gradient/-/react-native-linear-gradient-2.8.3.tgz#9a116649f86d74747304ee13db325e20b21e564f"
|
||||||
integrity sha512-KflAXZcEg54PXkLyflaSZQ3PJp4uC4whM7nT/Uot9m0e/qxFV3p6uor1983D1YOBJbJN7rrWdqIjq0T42jOJyA==
|
integrity sha512-KflAXZcEg54PXkLyflaSZQ3PJp4uC4whM7nT/Uot9m0e/qxFV3p6uor1983D1YOBJbJN7rrWdqIjq0T42jOJyA==
|
||||||
|
|
||||||
|
react-native-otp-inputs@^7.4.0:
|
||||||
|
version "7.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/react-native-otp-inputs/-/react-native-otp-inputs-7.4.0.tgz#ea1badabdf231faee5bcb5231034911bbba49aed"
|
||||||
|
integrity sha512-+phHrlcQQ63VuOrHaOZze7LP9WmzUGxGMlQx2A/jhPhYkCi/5hXDjxNcWyPXCy/RFRoLX+70HNpGqTgo0mDg7Q==
|
||||||
|
|
||||||
react-native-otp-textinput@^1.1.7:
|
react-native-otp-textinput@^1.1.7:
|
||||||
version "1.1.7"
|
version "1.1.7"
|
||||||
resolved "https://registry.yarnpkg.com/react-native-otp-textinput/-/react-native-otp-textinput-1.1.7.tgz#c7c3611c35701996777d117a1990c58ca94796da"
|
resolved "https://registry.yarnpkg.com/react-native-otp-textinput/-/react-native-otp-textinput-1.1.7.tgz#c7c3611c35701996777d117a1990c58ca94796da"
|
||||||
|
|||||||
Reference in New Issue
Block a user