project setup

This commit is contained in:
Sone
2025-11-02 10:08:56 +01:00
commit 568838003e
174 changed files with 27100 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
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 (
<View>
<TextInput
placeholder={placeholderText}
value={searchQuery}
onChangeText={onChange}
mode="outlined"
right={
searchQuery ? (
<TextInput.Icon icon="close" onPress={() => onChange("")} />
) : (
<TextInput.Icon icon="magnify" size={isSmall ? 20 : 24} />
)
}
style={isSmall ? { height: 40, fontSize: 14 } : undefined}
contentStyle={isSmall ? { paddingTop: 0, paddingBottom: 0 } : undefined}
outlineStyle={[
isSmall ? { borderRadius: 24 } : undefined,
{ borderColor: "transparent" },
]}
placeholderTextColor="#d9d9d9"
/>
</View>
);
};