about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-08-30 10:56:07 -0700
committerPaul Frazee <pfrazee@gmail.com>2023-08-30 10:56:07 -0700
commitcd8ae1298e6ef67e5c40cdde24449b49ae2d914b (patch)
tree337d006ff8a2cd04f6efbc62d4a36b600994a248
parentb847917969a2b86388ca88a84d6c8616bc40aeaf (diff)
downloadvoidsky-cd8ae1298e6ef67e5c40cdde24449b49ae2d914b.tar.zst
Tweak dark mode on web
-rw-r--r--src/view/com/util/layouts/TitleColumnLayout.tsx13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/view/com/util/layouts/TitleColumnLayout.tsx b/src/view/com/util/layouts/TitleColumnLayout.tsx
index 3ca10868e..7047446e3 100644
--- a/src/view/com/util/layouts/TitleColumnLayout.tsx
+++ b/src/view/com/util/layouts/TitleColumnLayout.tsx
@@ -1,6 +1,7 @@
 import React from 'react'
 import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native'
 import {usePalette} from 'lib/hooks/usePalette'
+import {useColorSchemeStyle} from 'lib/hooks/useColorSchemeStyle'
 
 interface Props {
   testID?: string
@@ -19,14 +20,20 @@ export function TitleColumnLayout({
   contentStyle,
 }: React.PropsWithChildren<Props>) {
   const pal = usePalette('default')
+  const titleBg = useColorSchemeStyle(pal.viewLight, pal.view)
+  const contentBg = useColorSchemeStyle(pal.view, {
+    backgroundColor: pal.colors.background,
+    borderColor: pal.colors.border,
+    borderLeftWidth: 1,
+  })
 
   const layoutStyles = horizontal ? styles2Column : styles1Column
   return (
     <View testID={testID} style={layoutStyles.container}>
-      <View style={[layoutStyles.title, pal.viewLight, titleStyle]}>
-        {title}
+      <View style={[layoutStyles.title, titleBg, titleStyle]}>{title}</View>
+      <View style={[layoutStyles.content, contentBg, contentStyle]}>
+        {children}
       </View>
-      <View style={[layoutStyles.content, contentStyle]}>{children}</View>
     </View>
   )
 }