Skip to content

Commit 7025b33

Browse files
Fix width for code snippets sent in messages (#4633)
1 parent 2bf994a commit 7025b33

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "MessageThread",
5+
"comment": "Fix width for code snippets sent in messages",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "fix",
4+
"workstream": "MessageThread",
5+
"comment": "Fix width for code snippets sent in messages",
6+
"packageName": "@azure/communication-react",
7+
"email": "98852890+vhuseinova-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

packages/react-components/src/components/styles/MessageThread.styles.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ export const useChatMessageStyles = makeStyles({
291291
...shorthands.borderWidth('1px'),
292292
...shorthands.borderColor(tokens.colorNeutralStroke1Selected),
293293
borderLeftWidth: '4px'
294+
},
295+
'& code': {
296+
whiteSpace: 'pre-wrap'
294297
}
295298
},
296299
bodyWithPlaceholderImage: {

0 commit comments

Comments
 (0)