Update navigation theme handling

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-11 12:50:12 +03:00
parent bf11f7a3e1
commit 7ed62507c7
2 changed files with 22 additions and 12 deletions

View File

@@ -10,6 +10,7 @@ import { BottomNavigation, Portal, useTheme } from 'react-native-paper';
import { Home, Search, Tags, Settings, AddItem } from './screens';
import { horizontalScale } from './styles';
import { FloatingActionButton } from './components';
import { darkNavigationTheme, lightNavigationTheme } from './theme';
function TabNavigator() {
const TabNavigatorBase = createBottomTabNavigator();
@@ -109,17 +110,7 @@ function NavigationContainer() {
return (
<NavigationContainerBase
theme={{
dark: theme.dark,
colors: {
primary: theme.colors.primary,
background: theme.colors.background,
card: theme.colors.surface,
text: theme.colors.onSurface,
border: theme.colors.outline,
notification: theme.colors.error,
},
}}>
theme={theme.dark ? darkNavigationTheme : lightNavigationTheme}>
<StackNavigatorBase.Navigator screenOptions={{ headerShown: false }}>
<StackNavigatorBase.Screen name="Main" component={TabNavigator} />
<StackNavigatorBase.Screen