From b2b1b7882b2913c8d5ab7e3af365fba4c8d20e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qu=E1=BB=91c=20Kh=C3=A1nh?= Date: Mon, 10 Jun 2024 03:41:05 +0700 Subject: [PATCH] feat(mobile): toggle dark mode --- apps/mobile/app/(app)/(tabs)/_layout.tsx | 6 +- apps/mobile/app/(app)/(tabs)/settings.tsx | 55 ++++++++++++++----- apps/mobile/app/(app)/_layout.tsx | 21 +++++++ apps/mobile/app/(app)/appearance.tsx | 30 ++++++++++ apps/mobile/app/(auth)/login.tsx | 4 +- apps/mobile/components/Button.tsx | 9 ++- apps/mobile/components/Tabs.tsx | 27 +++++++-- .../svg-assets/auth-illustration.tsx | 46 ++++++++-------- apps/mobile/global.css | 10 ++-- apps/mobile/lib/theme.ts | 8 +-- 10 files changed, 157 insertions(+), 59 deletions(-) create mode 100644 apps/mobile/app/(app)/appearance.tsx diff --git a/apps/mobile/app/(app)/(tabs)/_layout.tsx b/apps/mobile/app/(app)/(tabs)/_layout.tsx index 2f79449b..a4cb1631 100644 --- a/apps/mobile/app/(app)/(tabs)/_layout.tsx +++ b/apps/mobile/app/(app)/(tabs)/_layout.tsx @@ -13,12 +13,16 @@ export default function TabLayout() { tabBarShowLabel: false, tabBarStyle: { borderTopWidth: 0, + backgroundColor: theme[colorScheme ?? 'light'].background, }, headerTitleStyle: { - fontFamily: 'Be Vietnam Pro', + fontFamily: 'Be Vietnam Pro Medium', fontSize: 16, color: theme[colorScheme ?? 'light'].primary, }, + headerStyle: { + backgroundColor: theme[colorScheme ?? 'light'].background, + } }} > + @@ -29,7 +30,7 @@ export default function SettingsScreen() { label="Free" className="self-start rounded-md mb-1" /> - + {user?.fullName ?? user?.primaryEmailAddress?.emailAddress} @@ -37,17 +38,41 @@ export default function SettingsScreen() { - - Others - -