From 25ffdcd01080d1d7cd3d826dc63cff50172ffdde Mon Sep 17 00:00:00 2001 From: Petr Knetl Date: Thu, 6 Feb 2025 11:28:46 +0000 Subject: [PATCH] fix(suite-native): welcome flow ui review fixes --- .../src/screens/AnalyticsConsentScreen.tsx | 40 +++++++++++-------- .../src/screens/BiometricsScreen.tsx | 13 ++++-- 2 files changed, 34 insertions(+), 19 deletions(-) diff --git a/suite-native/module-onboarding/src/screens/AnalyticsConsentScreen.tsx b/suite-native/module-onboarding/src/screens/AnalyticsConsentScreen.tsx index 08a19d7eaaf..c068be6c0e9 100644 --- a/suite-native/module-onboarding/src/screens/AnalyticsConsentScreen.tsx +++ b/suite-native/module-onboarding/src/screens/AnalyticsConsentScreen.tsx @@ -1,4 +1,5 @@ import { useState } from 'react'; +import { TouchableOpacity } from 'react-native'; import { EventType, analytics } from '@suite-native/analytics'; import { Box, Button, Card, Switch, Text, TitleHeader, VStack } from '@suite-native/atoms'; @@ -57,6 +58,10 @@ export const AnalyticsConsentScreen = ({ handleOpenLink(LEARN_MORE_LINK); }; + const toggleAnalyticsConsent = () => { + setIsEnabled(prevIsEnabled => !prevIsEnabled); + }; + return ( @@ -92,23 +97,26 @@ export const AnalyticsConsentScreen = ({ } /> - - - - - { - setIsEnabled(enabled); - }} - /> - + + + + + + + diff --git a/suite-native/module-onboarding/src/screens/BiometricsScreen.tsx b/suite-native/module-onboarding/src/screens/BiometricsScreen.tsx index 51b0e1db1b7..7b7f09b27d6 100644 --- a/suite-native/module-onboarding/src/screens/BiometricsScreen.tsx +++ b/suite-native/module-onboarding/src/screens/BiometricsScreen.tsx @@ -17,10 +17,17 @@ import { StackProps, } from '@suite-native/navigation'; import { setIsOnboardingFinished } from '@suite-native/settings'; +import { prepareNativeStyle, useNativeStyles } from '@trezor/styles'; + +const titleStyle = prepareNativeStyle(_ => ({ + // this title should have smaller letter spacing by design. + letterSpacing: -1.4, +})); export const BiometricsScreen = ({ navigation, }: StackProps) => { + const { applyStyle } = useNativeStyles(); const { toggleBiometricsOption } = useBiometricsSettings(); const dispatch = useDispatch(); @@ -68,10 +75,10 @@ export const BiometricsScreen = ({ return ( }> - + - + - +