Skip to content

Commit

Permalink
fix: change style expensify card list
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Nov 6, 2024
1 parent 7c88169 commit 6ed1390
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function WorkspaceCardListHeader({policyID}: WorkspaceCardListHeaderProps) {
</Text>
</View>
{!shouldUseNarrowLayout && (
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentEnd]}>
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentStart]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
Expand Down
32 changes: 27 additions & 5 deletions src/pages/workspace/expensifyCard/WorkspaceCardListRow.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, {useMemo} from 'react';
import {View} from 'react-native';
import Avatar from '@components/Avatar';
import Badge from '@components/Badge';
import {FallbackAvatar} from '@components/Icon/Expensicons';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -59,12 +58,12 @@ function WorkspaceCardListRow({limit, cardholder, lastFourPAN, name, currency, i
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
>
{shouldUseNarrowLayout ? `${name}${cardType}` : name}
{name}
</Text>
</View>
</View>
{!shouldUseNarrowLayout && (
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentEnd]}>
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentStart]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
Expand All @@ -81,8 +80,31 @@ function WorkspaceCardListRow({limit, cardholder, lastFourPAN, name, currency, i
{lastFourPAN}
</Text>
</View>
<View style={[styles.flexRow, shouldUseNarrowLayout ? styles.flex3 : styles.flex1, styles.gap2, styles.alignItemsCenter, styles.justifyContentEnd]}>
<Badge text={CurrencyUtils.convertToDisplayString(limit, currency)} />
<View
style={[
!shouldUseNarrowLayout ? styles.flexRow : styles.flexColumn,
shouldUseNarrowLayout ? styles.flex3 : styles.flex1,
!shouldUseNarrowLayout && styles.gap2,
!shouldUseNarrowLayout ? styles.alignItemsCenter : styles.alignItemsEnd,
styles.justifyContentEnd,
]}
>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
>
{CurrencyUtils.convertToDisplayString(limit, currency)}
</Text>
{shouldUseNarrowLayout && (
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentStart]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
>
{cardType}
</Text>
</View>
)}
</View>
</View>
);
Expand Down

0 comments on commit 6ed1390

Please sign in to comment.