Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayaan-qadri committed Jan 12, 2025
1 parent e327ef2 commit 23d9d3a
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions frontend/src/conversation/ConversationBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,25 @@ const ConversationBubble = forwardRef<
}
/>
{!isEditClicked && (
<div
style={{
wordBreak: 'break-word',
}}
className="text-sm sm:text-base ml-2 mr-2 flex items-center rounded-[28px] bg-purple-30 py-[14px] px-[19px] text-white max-w-full whitespace-pre-wrap leading-normal"
>
{message}
</div>
<>
<div
style={{
wordBreak: 'break-word',
}}
className="text-sm sm:text-base ml-2 mr-2 flex items-center rounded-[28px] bg-purple-30 py-[14px] px-[19px] text-white max-w-full whitespace-pre-wrap leading-normal"
>
{message}
</div>
<button
onClick={() => {
setIsEditClicked(true);
setEditInputBox(message);
}}
className={`h-fit mt-3 p-2 cursor-pointer rounded-full hover:bg-[#35363B] flex items-center ${isQuestionHovered || isEditClicked ? 'visible' : 'invisible'}`}
>
<img src={Edit} alt="Edit" className="cursor-pointer" />
</button>
</>
)}
{isEditClicked && (
<div
Expand All @@ -124,7 +135,7 @@ const ConversationBubble = forwardRef<
/>
<div className="flex items-center justify-end gap-2">
<button
className="rounded-lg bg-[#CDB5FF] hover:bg-[#E1D3FF] px-4 py-2 text-purple-30 text-sm font-medium"
className="rounded-full bg-[#CDB5FF] hover:bg-[#E1D3FF] px-4 py-2 text-purple-30 text-sm font-medium"
onClick={handleEditClick}
>
Update
Expand All @@ -138,15 +149,6 @@ const ConversationBubble = forwardRef<
</div>
</div>
)}
<button
onClick={() => {
setIsEditClicked(true);
setEditInputBox(message);
}}
className={`h-fit mt-3 p-2 cursor-pointer rounded-full hover:bg-[#35363B] flex items-center ${isQuestionHovered || isEditClicked ? 'visible' : 'invisible'}`}
>
<img src={Edit} alt="Edit" className="cursor-pointer" />
</button>
</div>
</div>
);
Expand Down

0 comments on commit 23d9d3a

Please sign in to comment.