import { View } from "react-native"; import { TextInput } from "react-native-paper"; import { SizeEnum } from "@/constants/sizeEnum"; interface SearchBarProps { searchQuery: string; onChange: (query: string) => void; placeholderText?: string; size?: SizeEnum; } export const SearchBar = ({ searchQuery, onChange, placeholderText = "Search", size = SizeEnum.Regular, }: SearchBarProps) => { const isSmall = size === SizeEnum.Small; return ( onChange("")} /> ) : ( ) } style={isSmall ? { height: 40, fontSize: 14 } : undefined} contentStyle={isSmall ? { paddingTop: 0, paddingBottom: 0 } : undefined} outlineStyle={[ isSmall ? { borderRadius: 24 } : undefined, { borderColor: "transparent" }, ]} placeholderTextColor="#d9d9d9" /> ); };