Skip to content

Commit e2b58b0

Browse files
committed
fix spacing
1 parent 872853b commit e2b58b0

5 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/components/MoneyRequestReportView/MoneyRequestReportTransactionItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ function MoneyRequestReportTransactionItem({
129129
onCheckboxPress={toggleTransaction}
130130
columns={columns as Array<ValueOf<typeof CONST.REPORT.TRANSACTION_LIST.COLUMNS>>}
131131
isDisabled={isPendingDelete}
132+
style={[styles.p3, shouldUseNarrowLayout ? styles.pt2 : {}]}
132133
/>
133134
</PressableWithFeedback>
134135
</OfflineWithFeedback>

src/components/SelectionList/Search/TransactionGroupListItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function TransactionGroupListItem<TItem extends ListItem>({
6060
const policy = policies?.[`${ONYXKEYS.COLLECTION.POLICY}${groupItem?.policyID}`];
6161
const isEmpty = groupItem.transactions.length === 0;
6262
const isDisabledOrEmpty = isEmpty || isDisabled;
63-
const {isLargeScreenWidth} = useResponsiveLayout();
63+
const {isLargeScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
6464
const {currentSearchHash} = useSearchContext();
6565

6666
const {amountColumnSize, dateColumnSize, taxAmountColumnSize} = useMemo(() => {
@@ -208,7 +208,7 @@ function TransactionGroupListItem<TItem extends ListItem>({
208208
onButtonPress={() => {
209209
openReportInRHP(transaction);
210210
}}
211-
columnWrapperStyles={[styles.ph3, styles.pv1Half]}
211+
style={shouldUseNarrowLayout ? [styles.p3, styles.pt2] : [styles.ph3, styles.pv1Half, styles.noBorderRadius]}
212212
isReportItemChild
213213
isInSingleTransactionReport={groupItem.transactions.length === 1}
214214
/>

src/components/SelectionList/Search/TransactionListItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ function TransactionListItem<TItem extends ListItem>({
123123
amountColumnSize={amountColumnSize}
124124
taxAmountColumnSize={taxAmountColumnSize}
125125
shouldShowCheckbox={!!canSelectMultiple}
126+
style={[styles.p3, shouldUseNarrowLayout ? styles.pt2 : {}]}
126127
/>
127128
</PressableWithFeedback>
128129
</OfflineWithFeedback>

src/components/TransactionItemRow/index.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, {useMemo} from 'react';
22
import {View} from 'react-native';
3-
import type {ViewStyle} from 'react-native';
3+
import type {StyleProp, ViewStyle} from 'react-native';
44
import type {ValueOf} from 'type-fest';
55
import Checkbox from '@components/Checkbox';
66
import type {TransactionWithOptionalHighlight} from '@components/MoneyRequestReportView/MoneyRequestReportTransactionList';
@@ -89,7 +89,7 @@ type TransactionItemRowProps = {
8989
shouldShowCheckbox: boolean;
9090
columns?: Array<ValueOf<typeof CONST.REPORT.TRANSACTION_LIST.COLUMNS>>;
9191
onButtonPress?: () => void;
92-
columnWrapperStyles?: ViewStyle[];
92+
style?: StyleProp<ViewStyle>;
9393
isReportItemChild?: boolean;
9494
isActionLoading?: boolean;
9595
isInSingleTransactionReport?: boolean;
@@ -121,7 +121,7 @@ function TransactionItemRow({
121121
shouldShowCheckbox = false,
122122
columns,
123123
onButtonPress = () => {},
124-
columnWrapperStyles,
124+
style,
125125
isReportItemChild = false,
126126
isActionLoading,
127127
isInSingleTransactionReport = false,
@@ -360,14 +360,13 @@ function TransactionItemRow({
360360
transactionItem,
361361
],
362362
);
363-
const safeColumnWrapperStyle = columnWrapperStyles ?? [styles.p3, styles.expenseWidgetRadius];
364363
const shouldRenderChatBubbleCell = useMemo(() => {
365364
return columns?.includes(CONST.REPORT.TRANSACTION_LIST.COLUMNS.COMMENTS) ?? false;
366365
}, [columns]);
367366

368367
if (shouldUseNarrowLayout) {
369368
return (
370-
<View style={[styles.expenseWidgetRadius, styles.justifyContentEvenly, styles.p3, styles.pt2, bgActiveStyles]}>
369+
<View style={[styles.expenseWidgetRadius, styles.justifyContentEvenly, bgActiveStyles, style]}>
371370
<View style={[styles.flexRow]}>
372371
{shouldShowCheckbox && (
373372
<Checkbox
@@ -460,7 +459,7 @@ function TransactionItemRow({
460459
}
461460

462461
return (
463-
<View style={[...safeColumnWrapperStyle, styles.flex1, styles.gap2, bgActiveStyles, styles.mw100]}>
462+
<View style={[styles.expenseWidgetRadius, styles.flex1, styles.gap2, bgActiveStyles, styles.mw100, style]}>
464463
<View style={[styles.flex1, styles.flexRow, styles.alignItemsCenter, styles.gap3]}>
465464
<Checkbox
466465
disabled={isDisabled}

src/pages/UnreportedExpenseListItem.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function UnreportedExpenseListItem<TItem extends ListItem>({item, isFocused, sho
6565
setIsSelected((val) => !val);
6666
}}
6767
shouldShowCheckbox
68+
style={styles.p3}
6869
/>
6970
</PressableWithFeedback>
7071
</OfflineWithFeedback>

0 commit comments

Comments
 (0)