Skip to content

Commit

Permalink
fix: Messages use paddings instead of margin (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Jul 3, 2024
1 parent 2ca9190 commit 5150a66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const Composer: FC = () => {

const UserMessage: FC = () => {
return (
<MessagePrimitive.Root className="my-4 grid w-full max-w-2xl auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2">
<MessagePrimitive.Root className="grid w-full max-w-2xl auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 py-4">
<ActionBarPrimitive.Root
hideWhenRunning
autohide="not-last"
Expand Down Expand Up @@ -161,7 +161,7 @@ const EditComposer: FC = () => {

const AssistantMessage: FC = () => {
return (
<MessagePrimitive.Root className="relative my-4 grid w-full max-w-2xl grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr]">
<MessagePrimitive.Root className="relative grid w-full max-w-2xl grid-cols-[auto_auto_1fr] grid-rows-[auto_1fr] py-4">
<Avatar className="col-start-1 row-span-full row-start-1 mr-4">
<AvatarFallback>A</AvatarFallback>
</Avatar>
Expand Down
4 changes: 2 additions & 2 deletions packages/shadcn-registry/registry/assistant-ui/thread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const Composer: FC = () => {

const UserMessage: FC = () => {
return (
<MessagePrimitive.Root className="my-4 grid w-full max-w-2xl auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2">
<MessagePrimitive.Root className="grid w-full max-w-2xl auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 py-4">
<div className="bg-muted text-foreground col-start-2 row-start-1 max-w-xl break-words rounded-3xl px-5 py-2.5">
<MessagePrimitive.Content />
</div>
Expand All @@ -95,7 +95,7 @@ const UserMessage: FC = () => {

const AssistantMessage: FC = () => {
return (
<MessagePrimitive.Root className="relative my-4 grid w-full max-w-2xl grid-cols-[auto_1fr] grid-rows-[auto_1fr]">
<MessagePrimitive.Root className="relative grid w-full max-w-2xl grid-cols-[auto_1fr] grid-rows-[auto_1fr] py-4">
<Avatar className="col-start-1 row-span-full row-start-1 mr-4">
<AvatarFallback>A</AvatarFallback>
</Avatar>
Expand Down

0 comments on commit 5150a66

Please sign in to comment.