diff --git a/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.stories.tsx b/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.stories.tsx deleted file mode 100644 index cb596aba2a..0000000000 --- a/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.stories.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import {action} from '@storybook/addon-actions' -import {storiesOf} from '@storybook/react-native' -import React from 'react' -import {StyleSheet, View} from 'react-native' - -import {Info} from './Info' - -storiesOf('AddWallet Info Symbol', module) - .addDecorator((story) => {story()}) - .add('with icon', () => action('info pressed')} />) - -const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'yellow', - }, -}) diff --git a/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.tsx b/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.tsx deleted file mode 100644 index 1851bb5108..0000000000 --- a/apps/wallet-mobile/src/features/SetupWallet/common/Info/Info.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import * as React from 'react' -import {StyleSheet} from 'react-native' -import {TouchableOpacity} from 'react-native-gesture-handler' - -import {Spacer} from '../../../../components' -import {Info as InfoIcon} from '../../illustrations/Info' - -export const Info = ({onPress, paddingTop}: {onPress: () => void; paddingTop?: number}) => { - const {styles} = useStyles() - - return ( - - {paddingTop !== undefined && } - - - - ) -} - -const useStyles = () => { - const styles = StyleSheet.create({ - info: { - height: 24, - }, - }) - - return {styles} as const -} diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx index 976aaeff0d..f1f4edbf04 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx @@ -23,12 +23,12 @@ import {WalletInitRouteNavigation} from '../../../../navigation' import {generateAdaMnemonic} from '../../../../yoroi-wallets/cardano/mnemonic' import {CardAboutPhrase} from '../../common/CardAboutPhrase/CardAboutPhrase' import {YoroiZendeskLink} from '../../common/constants' -import {Info} from '../../common/Info/Info' import {LearnMoreButton} from '../../common/LearnMoreButton/LearnMoreButton' import {StepperProgress} from '../../common/StepperProgress/StepperProgress' import {useStrings} from '../../common/useStrings' import {EyeClosed as EyeClosedIllustration} from '../../illustrations/EyeClosed' import {EyeOpen as EyeOpenIllustration} from '../../illustrations/EyeOpen' +import {Info as InfoIcon} from '../../illustrations/Info' const useSizeModal = () => { const HEIGHT_SCREEN = useWindowDimensions().height @@ -130,7 +130,7 @@ export const RecoveryPhraseScreen = () => { {strings.recoveryPhraseTitle(bold)} - + @@ -184,6 +184,17 @@ export const RecoveryPhraseScreen = () => { ) } +const Info = ({onPress}: {onPress: () => void}) => { + const {styles} = useStyles() + return ( + + + + + + ) +} + const useBold = () => { const {styles} = useStyles() @@ -207,8 +218,6 @@ const useStyles = () => { title: { ...theme.typography['body-1-l-regular'], color: theme.color.gray[900], - lineHeight: 24, - flexDirection: 'row', }, bolder: { ...theme.typography['body-1-l-medium'], @@ -253,6 +262,14 @@ const useStyles = () => { ...theme.typography['button-2-m'], color: theme.color.primary[500], }, + info: { + position: 'relative', + }, + infoIcon: { + position: 'absolute', + top: -18, + left: 0, + }, }) const colors = { diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx index 458b8cd204..6bc156c1ac 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/WalletDetailsScreen.tsx @@ -12,6 +12,7 @@ import { StyleSheet, Text, TextInput as RNTextInput, + TouchableOpacity, useWindowDimensions, View, } from 'react-native' @@ -42,11 +43,11 @@ import {useSetSelectedWallet} from '../../../WalletManager/Context/SelectedWalle import {useSetSelectedWalletMeta} from '../../../WalletManager/Context/SelectedWalletMetaContext' import {CardAboutPhrase} from '../../common/CardAboutPhrase/CardAboutPhrase' import {YoroiZendeskLink} from '../../common/constants' -import {Info} from '../../common/Info/Info' import {LearnMoreButton} from '../../common/LearnMoreButton/LearnMoreButton' import {PreparingWallet} from '../../common/PreparingWallet/PreparingWallet' import {StepperProgress} from '../../common/StepperProgress/StepperProgress' import {useStrings} from '../../common/useStrings' +import {Info as InfoIcon} from '../../illustrations/Info' const useSizeModal = () => { const HEIGHT_SCREEN = useWindowDimensions().height @@ -291,7 +292,7 @@ export const WalletDetailsScreen = () => { totalSteps={4} /> - + {strings.walletDetailsTitle(bold)} @@ -384,6 +385,14 @@ export const WalletDetailsScreen = () => { ) } +const Info = ({onPress}: {onPress: () => void}) => { + return ( + + + + ) +} + const Actions = ({style, ...props}: ViewProps) => { const {styles} = useStyles() return @@ -407,7 +416,7 @@ const useStyles = () => { container: { flex: 1, }, - info: { + infoText: { ...theme.padding['x-l'], flexDirection: 'row', lineHeight: 24, diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/RestoreWallet/RestoreWalletDetailsScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/RestoreWallet/RestoreWalletDetailsScreen.tsx index 32835de8a6..251beb4c97 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/RestoreWallet/RestoreWalletDetailsScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/RestoreWallet/RestoreWalletDetailsScreen.tsx @@ -15,6 +15,7 @@ import { useWindowDimensions, View, } from 'react-native' +import {TouchableOpacity} from 'react-native-gesture-handler' import {SafeAreaView} from 'react-native-safe-area-context' import {Button, Icon, KeyboardAvoidingView, TextInput, useModal} from '../../../../components' @@ -41,11 +42,11 @@ import {useSetSelectedWallet} from '../../../WalletManager/Context/SelectedWalle import {useSetSelectedWalletMeta} from '../../../WalletManager/Context/SelectedWalletMetaContext' import {CardAboutPhrase} from '../../common/CardAboutPhrase/CardAboutPhrase' import {YoroiZendeskLink} from '../../common/constants' -import {Info} from '../../common/Info/Info' import {LearnMoreButton} from '../../common/LearnMoreButton/LearnMoreButton' import {PreparingWallet} from '../../common/PreparingWallet/PreparingWallet' import {StepperProgress} from '../../common/StepperProgress/StepperProgress' import {useStrings} from '../../common/useStrings' +import {Info as InfoIcon} from '../../illustrations/Info' const useSizeModal = () => { const HEIGHT_SCREEN = useWindowDimensions().height @@ -348,6 +349,14 @@ export const RestoreWalletDetailsScreen = () => { ) } +const Info = ({onPress}: {onPress: () => void}) => { + return ( + + + + ) +} + const useBold = () => { const {styles} = useStyles()