Skip to content

Commit 7eaf4fd

Browse files
committed
Improve edit message interface
1 parent 632f4d0 commit 7eaf4fd

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

frontend/src/conversation/ConversationBubble.tsx

+11-12
Original file line numberDiff line numberDiff line change
@@ -111,27 +111,26 @@ const ConversationBubble = forwardRef<
111111
</div>
112112
)}
113113
{isEditClicked && (
114-
<div ref={editableQueryRef} className="w-[75%] flex flex-col">
114+
<div
115+
ref={editableQueryRef}
116+
className="w-full mx-auto bg-transparent p-4 rounded-lg flex flex-col gap-4"
117+
>
115118
<textarea
116119
placeholder="Type the updated query..."
117-
onChange={(e) => {
118-
setEditInputBox(e.target.value);
119-
}}
120-
rows={1}
120+
onChange={(e) => setEditInputBox(e.target.value)}
121+
rows={5}
121122
value={editInputBox}
122-
className="ml-2 mr-12 text-[15px] resize-y h-12 min-h-max rounded-3xl p-3 no-scrollbar leading-relaxed dark:border-[0.5px] dark:border-white dark:bg-raisin-black dark:text-white px-[18px] border-[1.5px] border-black"
123+
className="w-full resize-none border-2 border-black dark:border-white rounded-3xl px-4 py-3 text-base leading-relaxed text-black dark:bg-raisin-black dark:text-white focus:outline-none focus:ring-2 focus:ring-[#CDB5FF]"
123124
/>
124-
<div
125-
className={`flex flex-row-reverse justify-end gap-1 mt-3 text-sm font-medium`}
126-
>
125+
<div className="flex items-center justify-end gap-2">
127126
<button
128-
className="rounded-full bg-[#CDB5FF] hover:bg-[#E1D3FF] py-[10px] px-[15px] text-purple-30 max-w-full whitespace-pre-wrap leading-none"
129-
onClick={() => handleEditClick()}
127+
className="rounded-lg bg-[#CDB5FF] hover:bg-[#E1D3FF] px-4 py-2 text-purple-30 text-sm font-medium"
128+
onClick={handleEditClick}
130129
>
131130
Update
132131
</button>
133132
<button
134-
className="py-[10px] px-[15px] no-underline hover:underline text-purple-30 max-w-full whitespace-pre-wrap leading-normal"
133+
className="px-4 py-2 text-purple-30 text-sm hover:underline"
135134
onClick={() => setIsEditClicked(false)}
136135
>
137136
Cancel

0 commit comments

Comments
 (0)