import React from 'react'; import { View, TextInput, TouchableOpacity, ViewStyle } from 'react-native'; import Icon from 'react-native-vector-icons/Ionicons'; import { useTheme } from '@theme'; import { getStyles } from './searchInput.styles'; import { SearchInputProps } from './searchInput.props'; export const SearchInput: React.FC = ({ value, onChangeText, placeholder = 'Search...', onClear, style, ...rest }) => { const { theme: colors } = useTheme(); const styles = getStyles(colors); const handleClear = () => { onChangeText(''); if (onClear) { onClear(); } }; return ( {value.length > 0 && ( )} ); };