From 4ec1943738e65e9248747000a7415a86439cbc35 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Wed, 26 Mar 2025 22:51:03 +0800 Subject: [PATCH] fix(chat-bubble): adjust message padding and layout styles --- src/components/ui/chat/chat-bubble.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/ui/chat/chat-bubble.tsx b/src/components/ui/chat/chat-bubble.tsx index e22a1e2..4c9cdb4 100644 --- a/src/components/ui/chat/chat-bubble.tsx +++ b/src/components/ui/chat/chat-bubble.tsx @@ -28,7 +28,7 @@ const chatBubbleVariant = cva( interface ChatBubbleProps extends React.HTMLAttributes, - VariantProps {} + VariantProps { } const ChatBubble = React.forwardRef( ({ className, variant, layout, children, ...props }, ref) => ( @@ -43,9 +43,9 @@ const ChatBubble = React.forwardRef( {React.Children.map(children, (child) => React.isValidElement(child) && typeof child.type !== "string" ? React.cloneElement(child, { - variant, - layout, - } as React.ComponentProps) + variant, + layout, + } as React.ComponentProps) : child, )} @@ -72,7 +72,7 @@ const ChatBubbleAvatar: React.FC = ({ ); // ChatBubbleMessage -const chatBubbleMessageVariants = cva("p-4", { +const chatBubbleMessageVariants = cva("p-0", { variants: { variant: { received: @@ -81,7 +81,7 @@ const chatBubbleMessageVariants = cva("p-4", { }, layout: { default: "", - ai: "border-t w-full rounded-none bg-transparent", + ai: "w-full rounded-none bg-transparent", }, }, defaultVariants: { @@ -92,7 +92,7 @@ const chatBubbleMessageVariants = cva("p-4", { interface ChatBubbleMessageProps extends React.HTMLAttributes, - VariantProps { + VariantProps { isLoading?: boolean; }