Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/SelectionListWithModal/CustomListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ function CustomListHeader({canSelectMultiple, leftHeaderText = '', rightHeaderTe
canSelectMultiple && styles.pl3,
]}
>
<Text style={styles.searchInputStyle}>{leftHeaderText}</Text>
<Text style={styles.textMicroSupporting}>{leftHeaderText}</Text>
<View style={[StyleUtils.getMinimumWidth(60)]}>
<Text style={[styles.searchInputStyle, styles.textAlignCenter]}>{rightHeaderText}</Text>
<Text style={[styles.textMicroSupporting, styles.textAlignCenter]}>{rightHeaderText}</Text>
</View>
</View>
);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/ReportParticipantsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ function ReportParticipantsPage({report, route}: ReportParticipantsPageProps) {
const header = (
<View style={[styles.flex1, styles.flexRow, styles.justifyContentBetween]}>
<View>
<Text style={[styles.searchInputStyle, canSelectMultiple ? styles.ml3 : styles.ml0]}>{translate('common.member')}</Text>
<Text style={[styles.textMicroSupporting, canSelectMultiple ? styles.ml3 : styles.ml0]}>{translate('common.member')}</Text>
</View>
{isGroupChat && (
<View style={[StyleUtils.getMinimumWidth(60)]}>
<Text style={[styles.searchInputStyle, styles.textAlignCenter]}>{translate('common.role')}</Text>
<Text style={[styles.textMicroSupporting, styles.textAlignCenter]}>{translate('common.role')}</Text>
</View>
)}
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RoomMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function RoomMembersPage({report, policies}: RoomMembersPageProps) {
const header = (
<View style={[styles.flex1, styles.flexRow, styles.justifyContentBetween]}>
<View>
<Text style={[styles.searchInputStyle, canSelectMultiple ? styles.ml3 : styles.ml0]}>{translate('common.member')}</Text>
<Text style={[styles.textMicroSupporting, canSelectMultiple ? styles.ml3 : styles.ml0]}>{translate('common.member')}</Text>
</View>
</View>
);
Expand Down
12 changes: 6 additions & 6 deletions src/pages/workspace/companyCards/WorkspaceCompanyCardsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {PressableWithFeedback} from '@components/Pressable';
import Text from '@components/Text';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import * as CardUtils from '@libs/CardUtils';
import {getDefaultCardName, sortCardsByCardholderName} from '@libs/CardUtils';
import Navigation from '@navigation/Navigation';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -37,7 +37,7 @@ function WorkspaceCompanyCardsList({cardsList, policyID, handleAssignCard, isDis
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST);
const [customCardNames] = useOnyx(ONYXKEYS.NVP_EXPENSIFY_COMPANY_CARDS_CUSTOM_NAMES);

const sortedCards = useMemo(() => CardUtils.sortCardsByCardholderName(cardsList, personalDetails), [cardsList, personalDetails]);
const sortedCards = useMemo(() => sortCardsByCardholderName(cardsList, personalDetails), [cardsList, personalDetails]);

const renderItem = useCallback(
({item, index}: ListRenderItemInfo<Card>) => {
Expand All @@ -64,9 +64,9 @@ function WorkspaceCompanyCardsList({cardsList, policyID, handleAssignCard, isDis
}}
>
<WorkspaceCompanyCardsListRow
cardholder={personalDetails?.[item.accountID ?? '-1']}
cardholder={personalDetails?.[item.accountID ?? CONST.DEFAULT_NUMBER_ID]}
cardNumber={item.lastFourPAN ?? ''}
name={customCardNames?.[item.cardID] ?? CardUtils.getDefaultCardName(personalDetails?.[item.accountID ?? '-1']?.firstName)}
name={customCardNames?.[item.cardID] ?? getDefaultCardName(personalDetails?.[item.accountID ?? CONST.DEFAULT_NUMBER_ID]?.firstName)}
/>
</PressableWithFeedback>
</OfflineWithFeedback>
Expand All @@ -80,13 +80,13 @@ function WorkspaceCompanyCardsList({cardsList, policyID, handleAssignCard, isDis
<View style={[styles.flexRow, styles.appBG, styles.justifyContentBetween, styles.mh5, styles.gap5, styles.p4]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('common.name')}
</Text>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('workspace.expensifyCard.lastFour')}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function WorkspaceCardListHeader({policyID}: WorkspaceCardListHeaderProps) {
<View style={[styles.flexRow, styles.flex4, styles.gap2, styles.alignItemsCenter]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('workspace.expensifyCard.name')}
</Text>
Expand All @@ -113,7 +113,7 @@ function WorkspaceCardListHeader({policyID}: WorkspaceCardListHeaderProps) {
<View style={[styles.flexRow, styles.gap2, styles.flex1, styles.alignItemsCenter, styles.justifyContentStart]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('common.type')}
</Text>
Expand All @@ -130,15 +130,15 @@ function WorkspaceCardListHeader({policyID}: WorkspaceCardListHeaderProps) {
>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('workspace.expensifyCard.lastFour')}
</Text>
</View>
<View style={[styles.flexRow, shouldUseNarrowLayout ? styles.flex3 : styles.flex1, styles.gap2, styles.alignItemsCenter, styles.justifyContentEnd]}>
<Text
numberOfLines={1}
style={[styles.textLabelSupporting, styles.lh16]}
style={[styles.textMicroSupporting, styles.lh16]}
>
{translate('workspace.expensifyCard.limit')}
</Text>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/workspace/members/WorkspaceOwnerPaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,23 @@ function WorkspaceOwnerPaymentCardForm({policy}: WorkspaceOwnerPaymentCardFormPr
containerStyles={[styles.mh0, styles.mt5]}
>
<View style={[styles.mt4, styles.ph2, styles.pb2]}>
<Text style={[styles.searchInputStyle, styles.dFlex, styles.alignItemsCenter]}>
<Text style={[styles.textSupportingNormal, styles.dFlex, styles.alignItemsCenter]}>
<Icon
src={Expensicons.Checkmark}
additionalStyles={[styles.mr3]}
fill={theme.iconSuccessFill}
/>
{translate('workspace.changeOwner.addPaymentCardPciCompliant')}
</Text>
<Text style={[styles.mt3, styles.searchInputStyle, styles.dFlex, styles.alignItemsCenter]}>
<Text style={[styles.mt3, styles.textSupportingNormal, styles.dFlex, styles.alignItemsCenter]}>
<Icon
src={Expensicons.Checkmark}
additionalStyles={[styles.mr3]}
fill={theme.iconSuccessFill}
/>
{translate('workspace.changeOwner.addPaymentCardBankLevelEncrypt')}
</Text>
<Text style={[styles.mt3, styles.searchInputStyle, styles.dFlex, styles.alignItemsCenter]}>
<Text style={[styles.mt3, styles.textSupportingNormal, styles.dFlex, styles.alignItemsCenter]}>
<Icon
src={Expensicons.Checkmark}
additionalStyles={[styles.mr3]}
Expand All @@ -132,10 +132,10 @@ function WorkspaceOwnerPaymentCardForm({policy}: WorkspaceOwnerPaymentCardFormPr
{translate('workspace.changeOwner.addPaymentCardRedundant')}
</Text>
</View>
<Text style={[styles.mt3, styles.searchInputStyle]}>
<Text style={[styles.mt3, styles.textSupportingNormal]}>
{translate('workspace.changeOwner.addPaymentCardLearnMore')}{' '}
<TextLink
style={[styles.searchInputStyle, styles.link]}
style={[styles.textSupportingNormal, styles.link]}
href={CONST.PERSONAL_DATA_PROTECTION_INFO_URL}
>
{translate('workspace.changeOwner.addPaymentCardSecurity')}
Expand Down
6 changes: 3 additions & 3 deletions src/pages/workspace/perDiem/WorkspacePerDiemPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ function WorkspacePerDiemPage({route}: WorkspacePerDiemPageProps) {
const getCustomListHeader = () => (
<View style={[styles.flex1, styles.flexRow, styles.justifyContentBetween, canSelectMultiple && styles.pl3, !canSelectMultiple && [styles.ph9, styles.pv3, styles.pb5]]}>
<View style={styles.flex3}>
<Text style={[styles.searchInputStyle, styles.alignSelfStart]}>{translate('common.destination')}</Text>
<Text style={[styles.textMicroSupporting, styles.alignSelfStart]}>{translate('common.destination')}</Text>
</View>
<View style={styles.flex2}>
<Text style={[styles.searchInputStyle, styles.alignItemsStart, styles.pl2]}>{translate('common.subrate')}</Text>
<Text style={[styles.textMicroSupporting, styles.alignItemsStart, styles.pl2]}>{translate('common.subrate')}</Text>
</View>
<View style={styles.flex2}>
<Text style={[styles.searchInputStyle, styles.alignSelfEnd]}>{translate('workspace.perDiem.amount')}</Text>
<Text style={[styles.textMicroSupporting, styles.alignSelfEnd]}>{translate('workspace.perDiem.amount')}</Text>
</View>
</View>
);
Expand Down
12 changes: 6 additions & 6 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ const styles = (theme: ThemeColors) =>
lineHeight: variables.lineHeightSmall,
},

textSupportingNormal: {
color: theme.textSupporting,
fontSize: variables.fontSizeNormal,
lineHeight: variables.fontSizeNormalHeight,
},

textExtraSmallSupporting: {
color: theme.textSupporting,
...FontUtils.fontFamily.platform.EXP_NEUE,
Expand Down Expand Up @@ -3738,12 +3744,6 @@ const styles = (theme: ThemeColors) =>
flex: 1,
},

searchInputStyle: {
color: theme.textSupporting,
fontSize: variables.fontSizeNormal,
lineHeight: variables.fontSizeNormalHeight,
},

searchRouterTextInputContainer: {
borderRadius: variables.componentBorderRadiusSmall,
borderWidth: 1,
Expand Down