Skip to content

Commit 6e5f0f1

Browse files
committed
feat(chat): expand input textarea on long input
1 parent 0079d34 commit 6e5f0f1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/components/chat/chat-input.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export default class IgcChatInputComponent extends LitElement {
270270
<igc-textarea
271271
class="text-input"
272272
placeholder="Type a message..."
273+
resize="auto"
273274
rows="1"
274275
.value=${this.inputValue}
275276
@input=${this.handleInput}

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ igc-file-input::part(file-names){
3232
border-radius: 24px;
3333
overflow: hidden;
3434
transition: box-shadow 0.2s;
35+
36+
igc-textarea {
37+
padding-top: 3px;
38+
padding-bottom: 3px;
39+
}
40+
41+
igc-textarea::part(input) {
42+
max-height: 115px;
43+
}
3544
}
3645

3746
.buttons-container {
@@ -72,10 +81,6 @@ igc-file-input::part(file-names){
7281
font-family: inherit;
7382
}
7483

75-
.input-wrapper:focus-within {
76-
box-shadow: 0 0 0 2px #0A84FF;
77-
}
78-
7984
.attachment-button,
8085
.send-button {
8186
display: flex;

0 commit comments

Comments
 (0)