diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/about/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/about/index.tsx index ce9ae34b1..f1f859c49 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/about/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/about/index.tsx @@ -34,9 +34,9 @@ export default function AboutRoute() { backgroundColor: currentTheme.colors.background, }, headerTitleStyle: { - fontSize: 24, + fontSize: 20, }, - headerTintColor: currentTheme.colors.tertiaryBlue, + headerTintColor: currentTheme.colors.text, // https://reactnavigation.org/docs/headers#adjusting-header-styles // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/maps/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/maps/index.tsx index fc393001f..9f342a7d0 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/maps/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/maps/index.tsx @@ -2,13 +2,15 @@ import { DrawerToggleButton } from '@react-navigation/drawer'; import useTheme from 'app/hooks/useTheme'; import { OfflineMapsScreen } from 'app/modules/map/screens/OfflineMapsScreen'; import { Stack } from 'expo-router'; +import { placesAutocompleteSearchAtom } from 'app/components/PlacesAutocomplete/usePlacesAutoComplete'; +import { useAtom } from 'jotai'; import Head from 'expo-router/head'; import React from 'react'; import { Platform } from 'react-native'; export default function MapsScreen() { const { currentTheme } = useTheme(); - + const [searchQuery, setSearchQuery] = useAtom(placesAutocompleteSearchAtom); return ( <> {Platform.OS === 'web' && ( @@ -23,14 +25,19 @@ export default function MapsScreen() { headerRight: ({ tintColor }) => ( ), - + headerSearchBarOptions: { + placeholder: 'Search maps', + hideWhenScrolling: false, + inputType: 'text', + onChangeText: (e) => setSearchQuery(e.nativeEvent.text), + }, headerStyle: { backgroundColor: currentTheme.colors.background, }, headerTitleStyle: { - fontSize: 24, + fontSize: 20, }, - headerTintColor: currentTheme.colors.tertiaryBlue, + headerTintColor: currentTheme.colors.text, // https://reactnavigation.org/docs/headers#adjusting-header-styles // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx index 9f2446cd5..64667864b 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx @@ -1,6 +1,8 @@ import { DrawerToggleButton } from '@react-navigation/drawer'; import useTheme from 'app/hooks/useTheme'; import { ProductsScreen } from 'app/modules/item'; +import { placesAutocompleteSearchAtom } from 'app/components/PlacesAutocomplete/usePlacesAutoComplete'; +import { useAtom } from 'jotai'; import { Stack } from 'expo-router'; import Head from 'expo-router/head'; import React from 'react'; @@ -8,7 +10,7 @@ import { Platform } from 'react-native'; export default function ProductsPage() { const { currentTheme } = useTheme(); - + const [searchQuery, setSearchQuery] = useAtom(placesAutocompleteSearchAtom); return ( <> {Platform.OS === 'web' && ( @@ -23,14 +25,20 @@ export default function ProductsPage() { headerRight: ({ tintColor }) => ( ), + headerSearchBarOptions: { + placeholder: 'Search products', + hideWhenScrolling: false, + inputType: 'text', + onChangeText: (e) => setSearchQuery(e.nativeEvent.text), + }, headerStyle: { backgroundColor: currentTheme.colors.background, }, headerTitleStyle: { - fontSize: 24, + fontSize: 20, }, - headerTintColor: currentTheme.colors.tertiaryBlue, + headerTintColor: currentTheme.colors.text, // https://reactnavigation.org/docs/headers#adjusting-header-styles // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/trips/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/trips/index.tsx index 019a04ab6..b1182ddea 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/trips/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/trips/index.tsx @@ -1,10 +1,14 @@ import React from 'react'; import { FeedScreen } from 'app/modules/feed'; +import { placesAutocompleteSearchAtom } from 'app/components/PlacesAutocomplete/usePlacesAutoComplete'; +import { useAtom } from 'jotai'; import { Platform } from 'react-native'; import { Stack } from 'expo-router'; import Head from 'expo-router/head'; export default function FeedNav() { + const [searchQuery, setSearchQuery] = useAtom(placesAutocompleteSearchAtom); + return ( <> {Platform.OS === 'web' && ( @@ -16,6 +20,12 @@ export default function FeedNav() { options={{ // https://reactnavigation.org/docs/headers#setting-the-header-title title: 'Trips', + headerSearchBarOptions: { + placeholder: 'Search trips', + hideWhenScrolling: false, + inputType: 'text', + onChangeText: (e) => setSearchQuery(e.nativeEvent.text), + }, // https://reactnavigation.org/docs/headers#adjusting-header-styles // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/packs/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/packs/index.tsx index 00798bb3b..f8d3e7def 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/packs/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/packs/index.tsx @@ -1,13 +1,16 @@ import { DrawerToggleButton } from '@react-navigation/drawer'; +import { placesAutocompleteSearchAtom } from 'app/components/PlacesAutocomplete/usePlacesAutoComplete'; import useTheme from 'app/hooks/useTheme'; import { FeedScreen } from 'app/modules/feed'; import { Stack } from 'expo-router'; import Head from 'expo-router/head'; +import { useAtom } from 'jotai'; import React from 'react'; import { Platform } from 'react-native'; export default function Packs() { const { currentTheme } = useTheme(); + const [searchQuery, setSearchQuery] = useAtom(placesAutocompleteSearchAtom); return ( <> @@ -20,6 +23,13 @@ export default function Packs() { options={{ // https://reactnavigation.org/docs/headers#setting-the-header-title title: 'Packs', + headerSearchBarOptions: { + placeholder: 'Search packs', + hideWhenScrolling: false, + inputType: 'text', + onChangeText: (e) => setSearchQuery(e.nativeEvent.text), + }, + headerRight: ({ tintColor }) => ( ), diff --git a/packages/app/components/layout/Layout.tsx b/packages/app/components/layout/Layout.tsx index 4b0e3c218..f9020fcbb 100644 --- a/packages/app/components/layout/Layout.tsx +++ b/packages/app/components/layout/Layout.tsx @@ -3,10 +3,10 @@ import React from 'react'; import { Platform, SafeAreaView } from 'react-native'; import { ScrollView, Stack, YStack } from 'tamagui'; -type LayoutProps = { +interface LayoutProps { children: React.ReactNode; customStyle?: Record; -}; +} const Layout: React.FC = ({ children, customStyle = {} }) => { const { currentTheme } = useTheme(); @@ -16,14 +16,14 @@ const Layout: React.FC = ({ children, customStyle = {} }) => { diff --git a/packages/app/screens/about/about.style.tsx b/packages/app/screens/about/about.style.tsx index ca59f4895..5e488804b 100644 --- a/packages/app/screens/about/about.style.tsx +++ b/packages/app/screens/about/about.style.tsx @@ -20,7 +20,7 @@ const loadStyles = (theme: any) => { header: { fontSize: 24, fontWeight: 'bold', - color: currentTheme.colors.tertiaryBlue, + color: currentTheme.colors.text, marginRight: 10, }, headerDark: { @@ -83,7 +83,7 @@ const loadStyles = (theme: any) => { lineHeight: 28, letterSpacing: 1, // fontFamily: "sans-serif", - color: currentTheme.colors.tertiaryBlue, + color: currentTheme.colors.text, marginBottom: 20, }, tertiaryBlue: {