Skip to content

Commit 4b2d329

Browse files
Fix text wrapping in Account Manager banner
Remove maxWidth:100% from the inner text container that was claiming all parent width and starving sibling elements (button, close icon) of space. Also remove the no-op flexWrap from Text, add flexShrink:0 to the Chat Now button, and use breakWord instead of breakAll for more natural word wrapping. Fixed Issues: Expensify/Expensify#597716 Co-authored-by: John Schuster <johncschuster@users.noreply.github.com>
1 parent d52908c commit 4b2d329

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/Banner.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ function Banner({
9090
styles.p5,
9191
styles.borderRadiusNormal,
9292
shouldHighlight ? styles.activeComponentBG : styles.hoveredComponentBG,
93-
styles.breakAll,
93+
styles.breakWord,
9494
containerStyles,
9595
]}
9696
>
97-
<View style={[styles.flexRow, styles.flex1, styles.mw100, styles.alignItemsCenter]}>
97+
<View style={[styles.flexRow, styles.flex1, styles.alignItemsCenter]}>
9898
{shouldShowIcon && !!displayIcon && (
9999
<View style={[styles.mr3]}>
100100
<Icon
@@ -110,7 +110,7 @@ function Banner({
110110
<RenderHTML html={text} />
111111
) : (
112112
<Text
113-
style={[styles.flex1, styles.flexWrap, textStyles]}
113+
style={[styles.flex1, textStyles]}
114114
onPress={onPress}
115115
suppressHighlighting
116116
>
@@ -121,7 +121,7 @@ function Banner({
121121
{shouldShowButton && (
122122
<Button
123123
success
124-
style={[styles.pr3]}
124+
style={[styles.pr3, styles.flexShrink0]}
125125
text={translate('common.chatNow')}
126126
onPress={onButtonPress}
127127
/>

0 commit comments

Comments
 (0)