Commit 60e1ea08 authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se creó la página para ingresar la nueva contraseña

parent a81a3fc6
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
import { View, StyleSheet } from "react-native";
import { CustomTextInput } from "../../common/components/form/text_input";
import { Control, Controller } from "react-hook-form";
import { ResetPasswordFormValues } from "../pages/reset_password_page";

interface PasswordFormProps {
  control: Control<ResetPasswordFormValues, any>;
}

export const PasswordForm = ({ control }: PasswordFormProps) => {
  return (
    <View style={styles.mainContainer}>
      <Controller
        control={control}
        name="newPassword"
        render={({ field: { onChange, onBlur, value } }) => (
          <CustomTextInput
            isPassword
            onBlur={onBlur}
            value={value}
            label="Password"
            textInputProps={{
              onChangeText: (value) => onChange(value),
            }}
          />
        )}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  mainContainer: {
    flex: 1,
    width: "100%",
  },
});