import React from 'react'; import { StyleSheet, TextInput, View } from 'react-native'; import { Ionicons } from '@expo/vector-icons'; import { useTheme } from '../theme'; interface SearchBarProps { value: string; onChangeText: (text: string) => void; placeholder?: string; } export function SearchBar({ value, onChangeText, placeholder }: SearchBarProps) { const { theme } = useTheme(); return ( {value ? ( onChangeText('')} /> ) : null} ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 12, paddingVertical: 8, marginHorizontal: 16, marginBottom: 8 }, icon: { marginRight: 8 }, input: { flex: 1, padding: 0, fontSize: 16 }, });