Skip to content

Commit 89cf0f0

Browse files
committed
fix(chat-input): use linear gradient border
1 parent deea44c commit 89cf0f0

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

bricks/ai-portal/src/chat-input/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ export interface ChatInputProps {
7575
submitDisabled?: boolean;
7676
supportsTerminate?: boolean;
7777
terminating?: boolean;
78+
autoFade?: boolean;
7879
uploadOptions?: UploadOptions;
7980
aiEmployees?: AIEmployee[];
8081
commands?: Command[];
@@ -117,6 +118,9 @@ class ChatInput extends ReactNextElement implements ChatInputProps {
117118
@property({ type: Boolean })
118119
accessor terminating: boolean | undefined;
119120

121+
@property({ type: Boolean, render: false })
122+
accessor autoFade: boolean | undefined;
123+
120124
@property({ attribute: false })
121125
accessor uploadOptions: UploadOptions | undefined;
122126

bricks/ai-portal/src/chat-input/styles.shadow.css

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,29 @@ button {
2424
}
2525

2626
.container {
27+
position: relative;
2728
background-color: #fff;
28-
border: 2px solid #7891ff;
29+
border: 2px solid transparent;
2930
border-radius: 12px;
31+
background-image:
32+
linear-gradient(#fff, #fff),
33+
linear-gradient(
34+
338deg,
35+
rgba(198, 183, 247, 1),
36+
rgba(157, 198, 255, 1),
37+
rgba(153, 196, 255, 1)
38+
);
39+
background-origin: border-box;
40+
background-clip: padding-box, border-box;
3041
box-shadow:
3142
0px 9px 28px 8px rgba(0, 0, 0, 0.05),
3243
0px 6px 16px 0px rgba(0, 0, 0, 0.08),
3344
0px 3px 6px -4px rgba(0, 0, 0, 0.12);
3445
cursor: text;
3546
}
3647

37-
.container:not(:has(textarea:focus)) {
38-
background-color: rgba(255, 255, 255, 0.5);
48+
:host([auto-fade]) .container:not(:has(textarea:focus)) {
49+
background: rgba(255, 255, 255, 0.5);
3950
border-color: #99c4ff;
4051
backdrop-filter: blur(10px);
4152
}

bricks/ai-portal/src/shared/ChatBox/ChatBox.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export function ChatBox({ state, canChat }: ChatBoxProps): JSX.Element {
4949
submitDisabled={!canChat}
5050
supportsTerminate={supports?.intercept}
5151
terminating={terminating}
52+
autoFade
5253
aiEmployees={aiEmployees}
5354
commands={commands}
5455
suggestionsPlacement="top"

0 commit comments

Comments
 (0)