Skip to content

Commit 766ab81

Browse files
Merge pull request #1077 from multiversx/ag/ask-ai
Fixed AI Chatbox styles
2 parents 10c494a + a52a0fc commit 766ab81

File tree

3 files changed

+10734
-13
lines changed

3 files changed

+10734
-13
lines changed

src/components/AskAiButton/ChatWindow.tsx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,21 @@ const ChatWindow = ({ onClose }) => {
7474
<div
7575
className="chat-modal bg-white dark:bg-neutral-900"
7676
style={{
77-
height: "50%",
77+
maxWidth: "min(960px, calc(100% - 32px))",
78+
maxHeight: "min(640px, calc(100% - 32px))",
79+
height: "100%",
80+
width: "100%",
7881
borderRadius: "16px",
82+
display: "flex",
83+
flexDirection: "column",
7984
overflow: "hidden",
8085
}}
8186
>
8287
{/* Modal Header */}
8388
<div
8489
className="chat-modal-header bg-white dark:bg-neutral-900 text-neutral-900 dark:text-white"
8590
style={{
86-
padding: "32px 0px 16px",
91+
padding: "16px 0px",
8792
margin: "0px 16px",
8893
borderBottom: "1px solid #333",
8994
display: "flex",
@@ -118,18 +123,18 @@ const ChatWindow = ({ onClose }) => {
118123
{/* Chat Messages Area */}
119124
<div
120125
style={{
121-
height: "60vh",
122126
display: "flex",
123127
flexDirection: "column",
124128
justifyContent: "flex-end",
129+
overflow: "auto",
130+
flex: 1,
125131
}}
126132
>
127133
<div
128134
className="chat-modal-body"
129135
ref={chatBodyRef}
130136
style={{
131137
padding: "16px 16px 32px",
132-
133138
overflowY: "auto",
134139
}}
135140
>
@@ -209,8 +214,7 @@ const ChatWindow = ({ onClose }) => {
209214
style={{
210215
display: "flex",
211216
position: "relative",
212-
padding: "0px 16px 32px",
213-
// boxShadow: " 0px -8px 32px 0px rgba(23,23,23,1)",
217+
padding: "0px 16px 16px",
214218
}}
215219
>
216220
<input
@@ -226,6 +230,7 @@ const ChatWindow = ({ onClose }) => {
226230
outline: "none",
227231
border: "1px solid #333",
228232
borderRadius: "12px",
233+
paddingRight: 64,
229234
background: "transparent",
230235
}}
231236
onKeyDown={(e) => {
@@ -246,7 +251,7 @@ const ChatWindow = ({ onClose }) => {
246251
position: "absolute",
247252
right: "20px",
248253
bottom: "50%",
249-
transform: "translateY(calc(50% - 16px))",
254+
transform: "translateY(calc(50% - 8px))",
250255
}}
251256
>
252257
Send

src/components/AskAiButton/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,19 @@ const AskAiButton = () => {
5151
onRequestClose={closeModal}
5252
contentLabel="Example Popup"
5353
style={{
54-
overlay: { backgroundColor: "rgba(0,0,0,0.5)" },
54+
overlay: { backgroundColor: "rgba(0,0,0,0.5)", zIndex: 200 },
5555
content: {
56-
maxWidth: "min(1200px, calc(100% - 32px))",
5756
position: "fixes",
58-
margin: "auto",
59-
marginTop: "70px",
60-
minHeight: "80vh",
61-
maxHeight: "80vh",
6257
zIndex: "10000",
58+
backgroundColor: "rgba(0,0,0,0.15)",
59+
height: "100vh",
6360
padding: "0px",
6461
background: "none",
6562
border: "none",
6663
overflow: "hidden",
64+
display: "flex",
65+
alignItems: "center",
66+
justifyContent: "center",
6767
},
6868
}}
6969
>

0 commit comments

Comments
 (0)