From d1b86b07fb0c7cafb40fddab163ff75148d44bfb Mon Sep 17 00:00:00 2001 From: Bryce Altman Date: Fri, 2 Feb 2024 16:04:48 +1100 Subject: [PATCH 1/5] Add caret icon next to currency select button --- src/components/CurrencySymbolButton.tsx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/components/CurrencySymbolButton.tsx b/src/components/CurrencySymbolButton.tsx index 18955bb0b391..43a7f2726b9a 100644 --- a/src/components/CurrencySymbolButton.tsx +++ b/src/components/CurrencySymbolButton.tsx @@ -2,9 +2,13 @@ import React from 'react'; import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; +import useTheme from '@hooks/useTheme'; +import { View } from 'react-native'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import Text from './Text'; import Tooltip from './Tooltip'; +import Icon from './Icon'; +import * as Expensicons from './Icon/Expensicons'; type CurrencySymbolButtonProps = { /** Currency symbol of selected currency */ @@ -15,8 +19,10 @@ type CurrencySymbolButtonProps = { }; function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencySymbolButtonProps) { + const { translate } = useLocalize(); const styles = useThemeStyles(); - const {translate} = useLocalize(); + const theme = useTheme(); + return ( + + {currencySymbol} + ); From ffd5f612c0391582eaa3cfb7bb9473f3e3a9cc2d Mon Sep 17 00:00:00 2001 From: Bryce Altman Date: Sat, 3 Feb 2024 01:59:36 +1100 Subject: [PATCH 2/5] Add spacing between caret, remove view --- src/components/CurrencySymbolButton.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/CurrencySymbolButton.tsx b/src/components/CurrencySymbolButton.tsx index 43a7f2726b9a..d5c0caede852 100644 --- a/src/components/CurrencySymbolButton.tsx +++ b/src/components/CurrencySymbolButton.tsx @@ -18,7 +18,7 @@ type CurrencySymbolButtonProps = { onCurrencyButtonPress: () => void; }; -function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencySymbolButtonProps) { +function CurrencySymbolButton({ onCurrencyButtonPress, currencySymbol }: CurrencySymbolButtonProps) { const { translate } = useLocalize(); const styles = useThemeStyles(); const theme = useTheme(); @@ -29,15 +29,14 @@ function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencyS onPress={onCurrencyButtonPress} accessibilityLabel={translate('common.selectCurrency')} role={CONST.ROLE.BUTTON} + style={[styles.flexRow, styles.alignItemsCenter, styles.gap1]} > - {currencySymbol} - ); From 414e99de85603855f56f137a0e10c89b617e8a9f Mon Sep 17 00:00:00 2001 From: Bryce Altman Date: Sat, 3 Feb 2024 12:12:48 +1100 Subject: [PATCH 3/5] remove import --- src/components/CurrencySymbolButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/CurrencySymbolButton.tsx b/src/components/CurrencySymbolButton.tsx index d5c0caede852..b1e352431567 100644 --- a/src/components/CurrencySymbolButton.tsx +++ b/src/components/CurrencySymbolButton.tsx @@ -3,7 +3,6 @@ import useLocalize from '@hooks/useLocalize'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; import useTheme from '@hooks/useTheme'; -import { View } from 'react-native'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import Text from './Text'; import Tooltip from './Tooltip'; From ffba9e62b7c9d776482ab0917b232185ab9114ab Mon Sep 17 00:00:00 2001 From: Bryce Altman Date: Mon, 5 Feb 2024 22:59:48 +1100 Subject: [PATCH 4/5] remove whitespace, add signing --- src/components/CurrencySymbolButton.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/CurrencySymbolButton.tsx b/src/components/CurrencySymbolButton.tsx index b1e352431567..86bba036eee2 100644 --- a/src/components/CurrencySymbolButton.tsx +++ b/src/components/CurrencySymbolButton.tsx @@ -21,7 +21,6 @@ function CurrencySymbolButton({ onCurrencyButtonPress, currencySymbol }: Currenc const { translate } = useLocalize(); const styles = useThemeStyles(); const theme = useTheme(); - return ( Date: Fri, 9 Feb 2024 17:53:10 +1100 Subject: [PATCH 5/5] linting --- src/components/CurrencySymbolButton.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/CurrencySymbolButton.tsx b/src/components/CurrencySymbolButton.tsx index 86bba036eee2..e913b415c328 100644 --- a/src/components/CurrencySymbolButton.tsx +++ b/src/components/CurrencySymbolButton.tsx @@ -1,13 +1,13 @@ import React from 'react'; import useLocalize from '@hooks/useLocalize'; +import useTheme from '@hooks/useTheme'; import useThemeStyles from '@hooks/useThemeStyles'; import CONST from '@src/CONST'; -import useTheme from '@hooks/useTheme'; +import Icon from './Icon'; +import * as Expensicons from './Icon/Expensicons'; import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback'; import Text from './Text'; import Tooltip from './Tooltip'; -import Icon from './Icon'; -import * as Expensicons from './Icon/Expensicons'; type CurrencySymbolButtonProps = { /** Currency symbol of selected currency */ @@ -17,8 +17,8 @@ type CurrencySymbolButtonProps = { onCurrencyButtonPress: () => void; }; -function CurrencySymbolButton({ onCurrencyButtonPress, currencySymbol }: CurrencySymbolButtonProps) { - const { translate } = useLocalize(); +function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencySymbolButtonProps) { + const {translate} = useLocalize(); const styles = useThemeStyles(); const theme = useTheme(); return (