From 498a8b2d8ce0eb8b523c381162517b3c01705d0d Mon Sep 17 00:00:00 2001 From: Sorin Chis Date: Tue, 30 Jan 2024 12:33:38 +0200 Subject: [PATCH] fix(send): tx details styles (#3063) --- .../ConfirmTx/Summary/ReceiverInfo.tsx | 43 +++++++++++++++---- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx index 28639c8196..0f03306d11 100644 --- a/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx +++ b/apps/wallet-mobile/src/features/Send/useCases/ConfirmTx/Summary/ReceiverInfo.tsx @@ -1,6 +1,7 @@ import {nameServerName} from '@yoroi/resolver' +import {useTheme} from '@yoroi/theme' import * as React from 'react' -import {View} from 'react-native' +import {StyleSheet, View} from 'react-native' import {Spacer} from '../../../../../components/Spacer' import {Text} from '../../../../../components/Text' @@ -13,34 +14,58 @@ type Props = { export const ReceiverInfo = ({target}: Props) => { const strings = useStrings() const {receiver, entry} = target + const styles = useStyles() return ( - {strings.receiver}: + {strings.receiver} - + {target.receiver.as === 'domain' ? ( <> - {receiver.selectedNameServer ? nameServerName[receiver.selectedNameServer] : ''}: + + {receiver.selectedNameServer ? nameServerName[receiver.selectedNameServer] : ''}: + - {receiver.resolve} + {receiver.resolve} - {strings.walletAddress}: + {strings.walletAddress}: - + - {entry.address} + + {entry.address} + ) : ( - {entry.address} + + {entry.address} + )} ) } + +const useStyles = () => { + const {theme} = useTheme() + const {typography, color} = theme + const styles = StyleSheet.create({ + label: { + ...typography['body-2-regular'], + color: color.gray[900], + }, + value: { + ...typography['body-1-regular'], + color: color.gray[900], + }, + }) + + return styles +}