Commit 876a45eb authored by Lorenzo Trujillo Rojas's avatar Lorenzo Trujillo Rojas
Browse files

Se atualizó la implementación del custom text input

parent 3e8f9de2
Loading
Loading
Loading
Loading
+15 −6
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ import { CustomTextInput } from "../../common/components/form/text_input";
import Checkbox from "expo-checkbox";
import { useState } from "react";
import { TouchableOpacity } from "@gorhom/bottom-sheet";
import { LIGTHT_THEME } from "../../common/constants/theme";
import { LIGHT_THEME } from "../../common/constants/theme";
import { CircleAvatar } from "../../common/components/circle_avatar";
import { MaterialIcons } from "@expo/vector-icons";
import { ScrollView } from "react-native-gesture-handler";
@@ -26,7 +26,7 @@ export const EditProfilePage = () => {
        alignItems: "center",
        gap: 20,
        padding: 20,
        backgroundColor: LIGTHT_THEME.color.white,
        backgroundColor: LIGHT_THEME.color.white,
      }}
    >
      <TouchableOpacity onPress={pickProfileImage}>
@@ -34,10 +34,11 @@ export const EditProfilePage = () => {
          source={profileImage ? { uri: profileImage } : avatarSource}
          size={100}
        />

        <MaterialIcons
          name="add-photo-alternate"
          size={40}
          color={LIGTHT_THEME.color.primary}
          color={LIGHT_THEME.color.primary}
          style={{
            position: "absolute",
            bottom: -10,
@@ -54,11 +55,15 @@ export const EditProfilePage = () => {
          formState: { errors },
        }) => (
          <CustomTextInput
            onChangeText={onChange}
            onBlur={onBlur}
            value={value}
            label="Name"
            errors={errors.name?.message}
            textInputProps={{
              autoComplete: "name",
              autoCapitalize: "words",
              onChangeText: onChange,
            }}
          />
        )}
        rules={{ required: "Name is required" }}
@@ -72,11 +77,15 @@ export const EditProfilePage = () => {
          formState: { errors },
        }) => (
          <CustomTextInput
            onChangeText={onChange}
            onBlur={onBlur}
            value={value}
            label="Last name"
            errors={errors.lastName?.message}
            textInputProps={{
              autoComplete: "name",
              autoCapitalize: "words",
              onChangeText: onChange,
            }}
          />
        )}
        rules={{ required: "Last name is required" }}
@@ -91,7 +100,7 @@ export const EditProfilePage = () => {

const styles = StyleSheet.create({
  saveBtn: {
    backgroundColor: LIGTHT_THEME.color.primary,
    backgroundColor: LIGHT_THEME.color.primary,
    height: 40,
    width: 100,
    padding: 10,