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
38 changes: 29 additions & 9 deletions src/components/ReportActionItem/TripRoomPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,35 @@ function ReservationView({reservation, onPress}: ReservationViewProps) {
const endName = reservation.type === CONST.RESERVATION_TYPE.FLIGHT ? reservation.end.shortName : reservation.end.longName;

titleComponent = (
<View style={[styles.flexRow, styles.alignItemsCenter, styles.gap2]}>
<Text style={[styles.labelStrong, styles.flexShrink1]}>{startName}</Text>
<Icon
src={Expensicons.ArrowRightLong}
width={variables.iconSizeSmall}
height={variables.iconSizeSmall}
fill={theme.icon}
/>
<Text style={[styles.labelStrong, styles.flexShrink1]}>{endName}</Text>
<View style={[styles.flexRow, styles.alignItemsStart]}>
<View style={styles.tripReservationRow}>
<View style={styles.flexShrink1}>
<Text
numberOfLines={2}
style={[styles.labelStrong, styles.mr2]}
ellipsizeMode="tail"
>
{startName}
</Text>
</View>
<View style={styles.iconWrapper}>
<Icon
src={Expensicons.ArrowRightLong}
width={variables.iconSizeSmall}
height={variables.iconSizeSmall}
fill={theme.icon}
/>
</View>
</View>
<View style={[styles.flex1, styles.ml2]}>
<Text
numberOfLines={2}
style={[styles.labelStrong]}
ellipsizeMode="tail"
>
{endName}
</Text>
</View>
</View>
);
}
Expand Down
14 changes: 14 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5624,6 +5624,20 @@ const styles = (theme: ThemeColors) =>
justifyContent: 'center',
},

tripReservationRow: {
flexDirection: 'row',
alignItems: 'center',
maxWidth: '50%',
flexShrink: 1,
},

iconWrapper: {
justifyContent: 'center',
alignItems: 'center',
alignSelf: 'flex-start', // Keeps icon from dropping below
paddingTop: 2, // Adjust slightly for vertical centering
},

textLineThrough: {
textDecorationLine: 'line-through',
},
Expand Down