Skip to content

Commit

Permalink
Merge pull request #35637 from BryceAltman/add-caret-currecy-select
Browse files Browse the repository at this point in the history
Add caret icon next to currency select button
  • Loading branch information
dangrous authored Feb 9, 2024
2 parents 85c990e + 4b92343 commit 7defd02
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/CurrencySymbolButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
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 Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import Text from './Text';
import Tooltip from './Tooltip';
Expand All @@ -15,15 +18,22 @@ type CurrencySymbolButtonProps = {
};

function CurrencySymbolButton({onCurrencyButtonPress, currencySymbol}: CurrencySymbolButtonProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();
const styles = useThemeStyles();
const theme = useTheme();
return (
<Tooltip text={translate('common.selectCurrency')}>
<PressableWithoutFeedback
onPress={onCurrencyButtonPress}
accessibilityLabel={translate('common.selectCurrency')}
role={CONST.ROLE.BUTTON}
style={[styles.flexRow, styles.alignItemsCenter, styles.gap1]}
>
<Icon
small
src={Expensicons.DownArrow}
fill={theme.icon}
/>
<Text style={styles.iouAmountText}>{currencySymbol}</Text>
</PressableWithoutFeedback>
</Tooltip>
Expand Down

0 comments on commit 7defd02

Please sign in to comment.