Files
cozsweet-frontend-nextjs/src/app/chat/components/text-bubble.tsx
T

27 lines
607 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
/**
* TextBubble 文字气泡
*
* 原始 Dart: lib/ui/chat/widgets/text_bubble.dart41 行)
*
* 视觉差异:
* - AI 消息:白底黑字 + 左上角尖角
* - 用户消息:渐变(primaryGradient+ 白字 + 右上角尖角
*/
import styles from "./text-bubble.module.css";
export interface TextBubbleProps {
content: string;
isFromAI: boolean;
}
export function TextBubble({ content, isFromAI }: TextBubbleProps) {
return (
<div
className={`${styles.bubble} ${isFromAI ? styles.bubbleAi : styles.bubbleUser}`}
>
{content}
</div>
);
}