From 61d705bd031669382526d0e4c7e49ce1fa358bb0 Mon Sep 17 00:00:00 2001 From: Chirag Chandrakant Salian Date: Wed, 22 May 2024 13:23:12 -0700 Subject: [PATCH] Merge pull request #42329 from nkdengineer/fix/42210 fix: Split scan - Excessive header space in split menu (cherry picked from commit 7eac0bdbba9610eebdc8e3a53d34df759e715b49) --- src/components/MoneyRequestHeaderStatusBar.tsx | 7 +++++-- src/pages/iou/SplitBillDetailsPage.tsx | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestHeaderStatusBar.tsx b/src/components/MoneyRequestHeaderStatusBar.tsx index b7bba0223656..5ad3c332cad9 100644 --- a/src/components/MoneyRequestHeaderStatusBar.tsx +++ b/src/components/MoneyRequestHeaderStatusBar.tsx @@ -17,9 +17,12 @@ type MoneyRequestHeaderStatusBarProps = { /** Whether we should use the danger theme color */ danger?: boolean; + + /** Whether we style flex grow */ + shouldStyleFlexGrow?: boolean; }; -function MoneyRequestHeaderStatusBar({title, description, shouldShowBorderBottom, danger = false}: MoneyRequestHeaderStatusBarProps) { +function MoneyRequestHeaderStatusBar({title, description, shouldShowBorderBottom, danger = false, shouldStyleFlexGrow = true}: MoneyRequestHeaderStatusBarProps) { const styles = useThemeStyles(); const borderBottomStyle = shouldShowBorderBottom ? styles.borderBottom : {}; return ( @@ -28,7 +31,7 @@ function MoneyRequestHeaderStatusBar({title, description, shouldShowBorderBottom styles.dFlex, styles.flexRow, styles.alignItemsCenter, - styles.flexGrow1, + shouldStyleFlexGrow && styles.flexGrow1, styles.overflowHidden, styles.ph5, styles.pb3, diff --git a/src/pages/iou/SplitBillDetailsPage.tsx b/src/pages/iou/SplitBillDetailsPage.tsx index 51b432d7e860..7d0b9bb15b07 100644 --- a/src/pages/iou/SplitBillDetailsPage.tsx +++ b/src/pages/iou/SplitBillDetailsPage.tsx @@ -103,6 +103,7 @@ function SplitBillDetailsPage({personalDetails, report, route, reportActions, tr title={translate('iou.receiptStatusTitle')} description={translate('iou.receiptStatusText')} shouldShowBorderBottom + shouldStyleFlexGrow={false} /> )} {!!participants.length && (