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
8 changes: 6 additions & 2 deletions src/components/ParentNavigationSubtitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ type ParentNavigationSubtitleProps = {

/** The style of the status text container */
statusTextContainerStyles?: StyleProp<ViewStyle>;

/** The number of lines for the subtitle */
subtitleNumberOfLines?: number;
};

function ParentNavigationSubtitle({
Expand All @@ -66,6 +69,7 @@ function ParentNavigationSubtitle({
statusTextBackgroundColor,
statusTextColor,
statusTextContainerStyles,
subtitleNumberOfLines = 1,
}: ParentNavigationSubtitleProps) {
const currentRoute = useRoute();
const styles = useThemeStyles();
Expand Down Expand Up @@ -135,7 +139,7 @@ function ParentNavigationSubtitle({
};

return (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<View style={[styles.flexRow, styles.alignItemsCenter, styles.w100]}>
{!!statusText && (
<View
style={[
Expand All @@ -152,7 +156,7 @@ function ParentNavigationSubtitle({
)}
<Text
style={[styles.optionAlternateText, styles.textLabelSupporting, styles.flex1, textStyles]}
numberOfLines={1}
numberOfLines={subtitleNumberOfLines}
>
{!!reportName && (
<>
Expand Down
3 changes: 3 additions & 0 deletions src/pages/ReportDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,8 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
parentReportID={report?.parentReportID}
parentReportActionID={report?.parentReportActionID}
pressableStyles={[styles.mt1, styles.mw100]}
textStyles={[styles.textAlignCenter]}
subtitleNumberOfLines={2}
/>
)}
</View>
Expand Down Expand Up @@ -772,6 +774,7 @@ function ReportDetailsPage({policy, report, route, reportMetadata}: ReportDetail
parentReportID={report?.parentReportID}
parentReportActionID={report?.parentReportActionID}
pressableStyles={[styles.mt1, styles.mw100]}
subtitleNumberOfLines={2}
/>
);

Expand Down
Loading