Skip to content

Commit dcda60f

Browse files
committed
chore(chat): component styling
1 parent dec1240 commit dcda60f

File tree

5 files changed

+52
-11
lines changed

5 files changed

+52
-11
lines changed

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
@use 'styles/common/component';
22
@use 'styles/utilities' as *;
33

4+
//should be removed
45
:host {
56
width: 100%;
67
height: 600px;
78
overflow: hidden;
8-
box-shadow: 0 8px 24px #1f1f1f;
9+
box-shadow: var(--ig-elevation-4);
910
display: flex;
1011
flex-direction: column;
1112
}
@@ -16,11 +17,14 @@
1617
align-items: center;
1718
height: 100%;
1819
gap: rem(40px);
20+
}
1921

20-
> * {
21-
max-width: rem(760px);
22-
width: 100%;
23-
}
22+
igc-chat-message-list,
23+
[part='empty-state'],
24+
[part='suggestions-container'] {
25+
max-width: rem(760px);
26+
width: 100%;
27+
margin-inline: rem(16px);
2428
}
2529

2630
[part='empty-state'] {
@@ -34,7 +38,7 @@
3438
padding: rem(16px) rem(13px);
3539
gap: rem(16px);
3640
box-shadow: var(--ig-elevation-4);
37-
max-width: 100%;
41+
width: 100%;
3842
}
3943

4044
[part='title'] {
@@ -50,5 +54,7 @@
5054

5155
igc-chip {
5256
--ig-size: 3;
57+
58+
width: fit-content;
5359
}
5460
}

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

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
@use 'styles/common/component';
22
@use 'styles/utilities' as *;
33

4+
:host {
5+
display: flex;
6+
align-items: center;
7+
width: 100%;
8+
padding-block: rem(16px);
9+
justify-content: center;
10+
}
11+
12+
[part~='input-container'] {
13+
display: flex;
14+
flex-direction: column;
15+
max-width: rem(760px);
16+
width: 100%;
17+
margin-inline: rem(16px);
18+
gap: rem(8px);
19+
}
20+
21+
//should be changed when the design is ready
22+
[part~='dragging'] {
23+
igc-textarea::part(container) {
24+
background: color(gray, 300);
25+
26+
&::after {
27+
border-block-end: rem(2px) solid color(primary, 500);
28+
}
29+
}
30+
}
31+
432
[part='buttons-container'] {
533
display: flex;
634
align-items: center;
7-
margin-block: rem(8px) rem(16px);
835
}
936

1037
[part='send-button'] {
@@ -14,7 +41,6 @@
1441
[part='attachments'] {
1542
display: flex;
1643
gap: rem(8px);
17-
margin-block-end: rem(8px);
1844
}
1945

2046
igc-file-input {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
display: flex;
66
justify-content: flex-start;
77
align-items: flex-end;
8+
margin-inline-end: auto;
9+
max-width: rem(576px);
810
}
911

1012
[part~='sent'] {
11-
max-width: rem(576px);
1213
margin-inline-start: auto;
14+
margin-inline-end: unset;
1315
padding: rem(12px) rem(16px);
1416
border-radius: rem(24px) rem(24px) 0;
1517
}

src/components/chat/themes/shared/chat-message.common.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33

44
$theme: $material;
55

6+
//should be changed when the design is ready
7+
:host([part~='active']) {
8+
&::part(message-container) {
9+
box-shadow: inset 0 0 0 rem(1px) var-get($theme, 'message-color');
10+
}
11+
}
12+
613
[part~='sent'] {
714
background: var-get($theme, 'message-background');
815
}
916

1017
[part~='bubble'] {
1118
color: var-get($theme, 'message-color');
12-
}
19+
}

src/components/chat/themes/shared/chat.common.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
$theme: $material;
55

6-
.chat-container {
6+
:host {
77
background: var-get($theme, 'background');
88
}
99

0 commit comments

Comments
 (0)