refactor(chat): migrate simple bubble styles to tailwind
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user