Skip to content

Commit 175c8ac

Browse files
Merge pull request #180 from OpenAssistantGPT/feat/post-message-on-parent-for-message
feat: update margin in messages
2 parents 2a1d5f0 + 57d293f commit 175c8ac

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.changeset/kind-zebras-call.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openassistantgpt/ui': patch
3+
---
4+
5+
Update marging and padding issue

packages/ui/components/chat-message.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ export function ChatMessage({
6161
background: chatbot.userReplyBackgroundColor,
6262
fontSize, // Apply font size in pixels here
6363
}}
64-
className="p-2 rounded-lg mr-3 whitespace-pre-wrap"
64+
className={`p-2 rounded-lg whitespace-pre-wrap ${
65+
withChatMessageIcon ? 'mr-4' : 'mr-3'
66+
}`}
6567
dir={getDirection(chatbot.rightToLeftLanguage)} // Set text direction
6668
>
6769
<svg
6870
fill={chatbot.userReplyBackgroundColor}
6971
className={`absolute bottom-[0px] ${
70-
chatbot.withChatMessageIcon ? 'right-14' : 'right-2'
72+
chatbot.withChatMessageIcon ? 'right-11' : 'right-2'
7173
}`}
7274
height="14"
7375
width="13"
@@ -80,7 +82,7 @@ export function ChatMessage({
8082
{withChatMessageIcon && (
8183
<div
8284
className={cn(
83-
'flex size-8 shrink-0 mr-4 select-none items-center justify-center rounded-md border shadow',
85+
'flex size-8 shrink-0 select-none items-center justify-center rounded-md border shadow',
8486
'bg-background',
8587
)}
8688
>

packages/ui/components/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export function OpenAssistantGPTChat({
249249
<div
250250
ref={messagesContainerRef}
251251
className={cn(
252-
'pb-[200px] overflow-auto max-h-max pl-2 pr-2 sm:pl-20 sm:pr-20 md:pb-[100px] pt-4 md:pt-10',
252+
'pb-[200px] overflow-auto max-h-max pl-6 pr-6 sm:pl-20 sm:pr-20 md:pb-[100px] pt-4 md:pt-10',
253253
className,
254254
)}
255255
>

0 commit comments

Comments
 (0)