amazing design

This commit is contained in:
2025-07-03 20:56:50 +05:00
parent 2a597df2d3
commit b56a96f0ff
5 changed files with 225 additions and 156 deletions

View File

@@ -1,9 +1,9 @@
import React, { useState } from 'react';
import React, { useState, forwardRef } from 'react';
import { View, TextInput, Text, StyleSheet, TouchableOpacity } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import { COLORS } from '../constants/colors';
const Input = ({
const Input = forwardRef(({
label,
value,
onChangeText,
@@ -17,7 +17,7 @@ const Input = ({
returnKeyType = 'done',
onSubmitEditing,
...props
}) => {
}, ref) => {
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
const [isFocused, setIsFocused] = useState(false);
@@ -40,6 +40,7 @@ const Input = ({
</View>
)}
<TextInput
ref={ref}
style={[styles.input, leftIcon && styles.inputWithLeftIcon]}
value={value}
onChangeText={onChangeText}
@@ -70,7 +71,7 @@ const Input = ({
{error && <Text style={styles.errorText}>{error}</Text>}
</View>
);
};
});
const styles = StyleSheet.create({
container: {