Commit a9bf90d3 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se creó la página para ingresar el código multidígito

parent f518dc6f
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
import { View, Text, StyleSheet } from "react-native";
import { MultipleDigitsCode } from "./multiple_digits_code";
import { Control, UseFormSetValue } from "react-hook-form";
import { ResetPasswordFormValues } from "../pages/reset_password_page";


interface CodeFormProps {
    setValue: UseFormSetValue<ResetPasswordFormValues>;
}

export const CodeForm = ({ setValue }: CodeFormProps) => {
    const onTextChange = (value: string) => {
        console.log("CodeForm onTextChange", value);
        setValue("code", value);
    };

    return (
        <View style={styles.container}>
            <Text>Introduce el código de verificación</Text>
            <MultipleDigitsCode length={6} onTextChange={onTextChange} />
        </View>
    );
};

const styles = StyleSheet.create({
    container: {
        flex: 1, 
        width: "100%",
        gap: 20,
    },
});
 No newline at end of file