diff --git a/packages/mobile/src/components/core/Text.tsx b/packages/mobile/src/components/core/Text.tsx index 2cc8c1a961..6823ceb914 100644 --- a/packages/mobile/src/components/core/Text.tsx +++ b/packages/mobile/src/components/core/Text.tsx @@ -21,6 +21,7 @@ export type TextProps = RNTextProps & { weight?: FontWeight fontSize?: FontSize | 'inherit' textTransform?: TextStyle['textTransform'] + allowNewline?: boolean } const useStyles = makeStyles(({ typography, palette }) => ({ @@ -41,6 +42,8 @@ export const Text = (props: TextProps) => { weight, fontSize: fontSizeProp, textTransform, + children: childrenProp, + allowNewline, ...other } = props const variant = variantProp ?? 'body' @@ -85,5 +88,14 @@ export const Text = (props: TextProps) => { ] ) - return + const children = + typeof childrenProp === 'string' && !allowNewline + ? childrenProp.replace('\n', ' ') + : childrenProp + + return ( + + {children} + + ) } diff --git a/packages/mobile/src/components/delete-chat-drawer/DeleteChatDrawer.tsx b/packages/mobile/src/components/delete-chat-drawer/DeleteChatDrawer.tsx index 61ba75cced..c644c1d1ed 100644 --- a/packages/mobile/src/components/delete-chat-drawer/DeleteChatDrawer.tsx +++ b/packages/mobile/src/components/delete-chat-drawer/DeleteChatDrawer.tsx @@ -91,7 +91,9 @@ export const DeleteChatDrawer = () => { {messages.title} - {messages.description} + + {messages.description} +