about summary refs log tree commit diff
path: root/src/Navigation.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-04-12 18:49:40 -0700
committerGitHub <noreply@github.com>2023-04-12 18:49:40 -0700
commitf50f07f562b82e15be28aa750d7e45629081faa3 (patch)
treefe814bd142983f3e734949b7f95efeb8130edd0a /src/Navigation.tsx
parent05e4e4ff93b0e4b7c5515852017be046ebc3859c (diff)
downloadvoidsky-f50f07f562b82e15be28aa750d7e45629081faa3.tar.zst
#435 web dark mode (#455)
* add ThemeProvider to App.web.tsx

* make FlatNavigator use themed color

* fix extra padding on top in web

* add observer to App.web.tsx to make it react to theme changes

* fix TS for useColorSchemeStyle

* add dark mode toggle button to web LeftNav

* fix index.web.tsx border colors for web

* Move the darkmode desktop web toggle to the right nav column

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/Navigation.tsx')
-rw-r--r--src/Navigation.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Navigation.tsx b/src/Navigation.tsx
index 648859f16..0de31a4ad 100644
--- a/src/Navigation.tsx
+++ b/src/Navigation.tsx
@@ -40,6 +40,7 @@ import {PrivacyPolicyScreen} from './view/screens/PrivacyPolicy'
 import {TermsOfServiceScreen} from './view/screens/TermsOfService'
 import {CommunityGuidelinesScreen} from './view/screens/CommunityGuidelines'
 import {CopyrightPolicyScreen} from './view/screens/CopyrightPolicy'
+import {usePalette} from 'lib/hooks/usePalette'
 
 const navigationRef = createNavigationContainerRef<AllNavigatorParams>()
 
@@ -162,6 +163,7 @@ function NotificationsTabNavigator() {
  * in a single ("flat") stack.
  */
 function FlatNavigator() {
+  const pal = usePalette('default')
   return (
     <Flat.Navigator
       screenOptions={{
@@ -169,7 +171,7 @@ function FlatNavigator() {
         fullScreenGestureEnabled: true,
         headerShown: false,
         animationDuration: 250,
-        contentStyle: {backgroundColor: 'white'},
+        contentStyle: [pal.view],
       }}>
       <Flat.Screen name="Home" component={HomeScreen} />
       <Flat.Screen name="Search" component={SearchScreen} />