Skip to content

Commit

Permalink
Merge pull request #39944 from dragnoir/38643-fix
Browse files Browse the repository at this point in the history
Fix: style of page Transfer balance
  • Loading branch information
roryabraham authored Apr 23, 2024
2 parents 6e699cf + 28614bf commit 5e54d5a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/pages/settings/Wallet/ChooseTransferAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ function ChooseTransferAccountPage({walletTransfer = {}}: ChooseTransferAccountP
filterType={walletTransfer?.filterPaymentMethodType}
selectedMethodID={walletTransfer?.selectedAccountID}
shouldShowAddPaymentMethodButton={false}
shouldShowAddBankAccount={false}
shouldShowRightIcon={false}
/>
</View>
<MenuItem
Expand Down
22 changes: 20 additions & 2 deletions src/pages/settings/Wallet/PaymentMethodList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ type PaymentMethodListProps = PaymentMethodListOnyxProps & {
/** Whether the empty list message should be shown when the list is empty */
shouldShowEmptyListMessage?: boolean;

/** Whether the right icon should be shown in PaymentMethodItem */
shouldShowRightIcon?: boolean;

/** What to do when a menu item is pressed */
onPress: (
event?: GestureResponderEvent | KeyboardEvent,
Expand Down Expand Up @@ -186,6 +189,7 @@ function PaymentMethodList({
shouldEnableScroll = true,
style = {},
listItemStyle = {},
shouldShowRightIcon = true,
}: PaymentMethodListProps) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
Expand Down Expand Up @@ -265,12 +269,26 @@ function PaymentMethodList({
disabled: paymentMethod.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
isMethodActive,
iconRight: Expensicons.ThreeDots,
shouldShowRightIcon: true,
shouldShowRightIcon,
};
});

return combinedPaymentMethods;
}, [shouldShowAssignedCards, fundList, bankAccountList, styles, filterType, isOffline, cardList, translate, actionPaymentMethodType, activePaymentMethodID, StyleUtils, onPress]);
}, [
shouldShowAssignedCards,
fundList,
bankAccountList,
styles,
filterType,
isOffline,
cardList,
translate,
actionPaymentMethodType,
activePaymentMethodID,
StyleUtils,
shouldShowRightIcon,
onPress,
]);

/**
* Render placeholder when there are no payments methods
Expand Down
2 changes: 1 addition & 1 deletion src/pages/settings/Wallet/TransferBalancePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function TransferBalancePage({bankAccountList, fundList, userWallet, walletTrans
/>
))}
</View>
<Text style={[styles.p5, styles.textLabelSupporting, styles.justifyContentStart]}>{translate('transferAmountPage.whichAccount')}</Text>
<Text style={[styles.pt8, styles.ph5, styles.pb1, styles.textLabelSupporting, styles.justifyContentStart]}>{translate('transferAmountPage.whichAccount')}</Text>
{Boolean(selectedAccount) && (
<MenuItem
title={selectedAccount?.title}
Expand Down

0 comments on commit 5e54d5a

Please sign in to comment.