// components/ui/input.tsx import React, { forwardRef, useState } from 'react'; import { View, TextInput, Platform, type TextInputProps } from 'react-native'; import { cn } from '@/lib/utils'; import { useThemeColors } from '@/hooks/useThemeColors'; export interface InputProps extends TextInputProps { variant?: 'outline' | 'underline'; size?: 'sm' | 'md' | 'lg'; prefix?: React.ReactNode; suffix?: React.ReactNode; error?: boolean; containerClassName?: string; inputClassName?: string; } export const Input = forwardRef( ( { variant = 'outline', size = 'md', prefix, suffix, error = false, containerClassName, inputClassName, style, ...props }, ref ) => { const [isFocused, setIsFocused] = useState(false); const { colors } = useThemeColors(); const isOutline = variant === 'outline'; const sizeStyles = { sm: 'web:h-9 h-10', md: 'web:h-10 h-11', lg: 'web:h-12 h-13', }; const handleFocus = (e: any) => { setIsFocused(true); props.onFocus?.(e); }; const handleBlur = (e: any) => { setIsFocused(false); props.onBlur?.(e); }; return ( {prefix && {prefix}} {suffix && {suffix}} ); } ); Input.displayName = 'Input';