diff --git a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx index 60f278998f0de..30a5d798c863a 100644 --- a/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx +++ b/src/components/SelectionList/Search/ExpenseItemHeaderNarrow.tsx @@ -1,5 +1,6 @@ import React, {memo} from 'react'; import {View} from 'react-native'; +import type {StyleProp, ViewStyle} from 'react-native'; import Icon from '@components/Icon'; import * as Expensicons from '@components/Icon/Expensicons'; import {PressableWithFeedback} from '@components/Pressable'; @@ -19,6 +20,7 @@ type ExpenseItemHeaderNarrowProps = { participantFromDisplayName: string; participantToDisplayName: string; action?: SearchTransactionAction; + containerStyle?: StyleProp; onButtonPress: () => void; canSelectMultiple?: boolean; isSelected?: boolean; @@ -35,6 +37,7 @@ function ExpenseItemHeaderNarrow({ onButtonPress, action, canSelectMultiple, + containerStyle, isDisabledCheckbox, isSelected, isDisabled, @@ -46,7 +49,7 @@ function ExpenseItemHeaderNarrow({ const theme = useTheme(); return ( - + {canSelectMultiple && ( ({ return; } - const listItemPressableStyle = [styles.selectionListPressableItemWrapper, styles.pv3, item.isSelected && styles.activeComponentBG, isFocused && styles.sidebarLinkActive, styles.ph3]; + const listItemPressableStyle = [ + styles.selectionListPressableItemWrapper, + styles.pv1half, + styles.ph0, + styles.overflowHidden, + item.isSelected && styles.activeComponentBG, + isFocused && styles.sidebarLinkActive, + ]; const handleOnButtonPress = () => { onSelectRow(item); @@ -144,10 +151,11 @@ function ReportListItem({ participantToDisplayName={participantToDisplayName} action={reportItem.action} onButtonPress={handleOnButtonPress} + containerStyle={[styles.ph3, styles.pt1half, styles.mb1half]} /> )} - - + + {canSelectMultiple && ( ({ }} onCheckboxPress={() => onCheckboxPress?.(transaction as unknown as TItem)} showItemHeaderOnNarrowLayout={false} - containerStyle={styles.mt3} + containerStyle={[transaction.isSelected && styles.activeComponentBG, styles.ph3, styles.pv1half]} isChildListItem isDisabled={!!isDisabled} canSelectMultiple={!!canSelectMultiple} - isButtonSelected={item.isSelected} + isButtonSelected={transaction.isSelected} shouldShowTransactionCheckbox /> ))} diff --git a/src/styles/utils/spacing.ts b/src/styles/utils/spacing.ts index 877cffbe1292a..5b416f5a120e3 100644 --- a/src/styles/utils/spacing.ts +++ b/src/styles/utils/spacing.ts @@ -287,6 +287,10 @@ export default { marginBottom: 4, }, + mb1half: { + marginBottom: 6, + }, + mb2: { marginBottom: 8, }, @@ -401,6 +405,10 @@ export default { paddingVertical: 4, }, + pv1half: { + paddingVertical: 6, + }, + pv2: { paddingVertical: 8, }, @@ -549,6 +557,10 @@ export default { paddingTop: 4, }, + pt1half: { + paddingTop: 6, + }, + pt2: { paddingTop: 8, },