// components/form/Input.tsx import React from 'react'; import { TextInput, TextInputProps, View, StyleSheet } from 'react-native'; import { ThemedText } from '@/components/ThemedText'; import { useColorScheme } from '@/hooks/useColorScheme'; import { spacing } from '@/styles/sharedStyles'; interface InputProps extends TextInputProps { label?: string; error?: string; required?: boolean; } export const Input = React.forwardRef(({ label, error, required, style, ...props }, ref) => { const { colors } = useColorScheme(); return ( {label && ( {label} {required && *} )} {error && ( {error} )} ); }); const styles = StyleSheet.create({ container: { gap: spacing.small, }, labelContainer: { flexDirection: 'row', }, label: { fontSize: 16, fontWeight: '500', }, input: { padding: spacing.medium, borderRadius: 8, borderWidth: 1, fontSize: 16, }, errorText: { fontSize: 14, }, });