refactor(chat): migrate simple bubble styles to tailwind

This commit is contained in:
2026-07-11 13:31:46 +08:00
parent bbe1825bb3
commit b426cc7a72
5 changed files with 57 additions and 64 deletions
+5 -2
View File
@@ -2,23 +2,26 @@
import Image from "next/image";
import { UserMessageAvatar } from "@/app/_components";
import styles from "./message-avatar.module.css";
export interface MessageAvatarProps {
isFromAI: boolean;
userAvatarUrl?: string | null;
}
const AVATAR_CLASS_NAME =
"flex size-[var(--chat-avatar-size,43px)] shrink-0 items-center justify-center overflow-hidden rounded-full border-2 border-[var(--color-avatar-border,#fbf3f5)] bg-[var(--color-avatar-border,#fbf3f5)] shadow-[var(--shadow-input-box,0_1px_2px_rgba(0,0,0,0.1))]";
export function MessageAvatar({ isFromAI, userAvatarUrl }: MessageAvatarProps) {
if (isFromAI) {
return (
<div className={styles.avatar} aria-label="AI avatar">
<div className={AVATAR_CLASS_NAME} aria-label="AI avatar">
<Image
src="/images/chat/pic-chat-elio.png"
alt="Elio"
width={43}
height={43}
priority
className="size-full object-cover"
/>
</div>
);