diff --git a/.changeset/fix-fallback-body-styling.md b/.changeset/fix-fallback-body-styling.md new file mode 100644 index 000000000..9c80bbcd0 --- /dev/null +++ b/.changeset/fix-fallback-body-styling.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fixed the text wrapping behavior of fallback messages. diff --git a/src/app/components/message/content/FallbackContent.tsx b/src/app/components/message/content/FallbackContent.tsx index 9bd012a13..638e830c3 100644 --- a/src/app/components/message/content/FallbackContent.tsx +++ b/src/app/components/message/content/FallbackContent.tsx @@ -1,5 +1,7 @@ import { Box, Icon, Icons, Text, as, color, config } from 'folds'; +import { BreakWord } from '$styles/Text.css'; + const warningStyle = { color: color.Warning.Main, opacity: config.opacity.P300 }; const criticalStyle = { color: color.Critical.Main, opacity: config.opacity.P300 }; @@ -18,11 +20,21 @@ export const MessageDeletedContent = as<'div', { children?: never; reason?: stri export const MessageUnsupportedContent = as<'div', { children?: never; body?: string }>( ({ body, ...props }, ref) => ( - + - Unsupported message - {body && `: ${body}`} - {!body && ' (no body)'} + + Unsupported message + {body && `: ${body}`} + {!body && ' (no body)'} + ) ); @@ -51,11 +63,21 @@ export const MessageNotDecryptedContent = as<'div', { children?: never }>(({ ... // display body of the message if it is available, as it may give some clue about why the message is broken export const MessageBrokenContent = as<'div', { children?: never; body?: string }>( ({ body, ...props }, ref) => ( - + - Broken message - {body && `: ${body}`} - {!body && ' (no body)'} + + Broken message + {body && `: ${body}`} + {!body && ' (no body)'} + ) );