From 461ea15c6aadd915c2896d5fcc946120147531ad Mon Sep 17 00:00:00 2001 From: Jakz Date: Thu, 29 Feb 2024 13:42:30 +0800 Subject: [PATCH] Fix onboarding darkmode (#2338) * Make the wallet icon dark mode friendly * Fix dark mode on onboarding screen --- .../src/components/WelcomeNewUserOnboarding.tsx | 9 ++++++--- apps/mobile/src/icons/WalletIcon.tsx | 12 +++++++----- .../screens/Onboarding/OnboardingPersonaScreen.tsx | 4 ++-- .../Onboarding/OnboardingRecommendedUsers.tsx | 4 ++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/apps/mobile/src/components/WelcomeNewUserOnboarding.tsx b/apps/mobile/src/components/WelcomeNewUserOnboarding.tsx index e73a44b852..e4a2f8b028 100644 --- a/apps/mobile/src/components/WelcomeNewUserOnboarding.tsx +++ b/apps/mobile/src/components/WelcomeNewUserOnboarding.tsx @@ -1,5 +1,6 @@ import clsx from 'clsx'; import { BlurView } from 'expo-blur'; +import { useColorScheme } from 'nativewind'; import { useCallback, useEffect, useRef, useState } from 'react'; import { Animated, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; @@ -21,6 +22,8 @@ type Props = { }; export function WelcomeNewUserOnboarding({ username }: Props) { + const { colorScheme } = useColorScheme(); + // Step 1: Welcome message // Step 2: Post message // Step 3: Profile message @@ -83,7 +86,7 @@ export function WelcomeNewUserOnboarding({ username }: Props) { - + @@ -117,7 +120,7 @@ function Toast({ message, step }: { message: string; step: number }) { 'items-end pr-2': step === 3, })} > - + {message} @@ -147,7 +150,7 @@ function TabItem({ children, active = false, onPress, isFocused }: TabItemProps) diff --git a/apps/mobile/src/icons/WalletIcon.tsx b/apps/mobile/src/icons/WalletIcon.tsx index 273b64a5d4..d2b69d8a17 100644 --- a/apps/mobile/src/icons/WalletIcon.tsx +++ b/apps/mobile/src/icons/WalletIcon.tsx @@ -1,24 +1,26 @@ +import { useColorScheme } from 'nativewind'; import Svg, { Path, SvgProps } from 'react-native-svg'; export function WalletIcon(props: SvgProps) { + const { colorScheme } = useColorScheme(); + return ( - - + + - + +