Skip to content

Commit c7a397e

Browse files
committed
fix: fix dark mode for web
1 parent 3c5f852 commit c7a397e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/app/_layout.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ function RootLayoutNav() {
4545

4646
function Providers({ children }: { children: React.ReactNode }) {
4747
const theme = useThemeConfig();
48-
4948
return (
50-
<GestureHandlerRootView style={styles.container}>
49+
<GestureHandlerRootView
50+
style={styles.container}
51+
className={theme.dark ? `dark` : undefined}
52+
>
5153
<ThemeProvider value={theme}>
5254
<APIProvider>
5355
<BottomSheetModalProvider>

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const colors = require('./src/ui/colors');
44
module.exports = {
55
// NOTE: Update this to include the paths to all of your component files.
66
content: ['./src/**/*.{js,jsx,ts,tsx}'],
7+
darkMode: 'class',
78
presets: [require('nativewind/preset')],
89
theme: {
910
extend: {

0 commit comments

Comments
 (0)