Skip to content

Commit d5353c3

Browse files
committed
feat(chat): modify messages styling
1 parent 6bfe499 commit d5353c3

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/components/chat/chat-message.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ export default class IgcChatMessageComponent extends LitElement {
4646
public attachmentContentTemplate?: AttachmentTemplate;
4747

4848
protected override render() {
49-
const containerClass = `message-container ${!this.isResponse ? 'sent' : ''}`;
49+
const containerClass = `message-container ${!this.isResponse ? 'sent' : ''} bubble`;
5050

5151
return html`
5252
<div class=${containerClass}>
5353
${this.message?.text.trim()
54-
? html` <div class="bubble">
55-
${renderMarkdown(this.message?.text)}
56-
</div>`
54+
? html` <div>${renderMarkdown(this.message?.text)}</div>`
5755
: ''}
5856
${this.message?.attachments && this.message?.attachments.length > 0
5957
? html`<igc-message-attachments

src/components/chat/themes/message.base.scss

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,14 @@
88
}
99

1010
.message-container {
11-
display: flex;
11+
display: block;
1212
justify-content: flex-start;
1313
align-items: flex-end;
1414
gap: 8px;
1515
margin-bottom: 4px;
1616
animation: fadeIn 0.2s ease-out;
1717
}
1818

19-
.message-container.sent {
20-
flex-direction: row-reverse;
21-
}
22-
2319
.avatar {
2420
width: 32px;
2521
height: 32px;
@@ -51,19 +47,18 @@
5147
.bubble {
5248
padding: 12px 16px;
5349
border-radius: 18px;
54-
background-color: #E5E5EA;
5550
color: black;
5651
word-break: break-all;
5752
font-weight: 400;
5853
line-height: 1.4;
5954
position: relative;
6055
transition: all 0.2s ease;
56+
width: fit-content;
6157
}
6258

63-
.sent .bubble {
59+
.sent {
6460
border-radius: 18px 18px 4px;
65-
background-color: #0A84FF;
66-
color: white;
61+
background-color: #E5E5EA;
6762
}
6863

6964
.received .bubble {

0 commit comments

Comments
 (0)