mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
26 lines
500 B
TypeScript
26 lines
500 B
TypeScript
import Avatar from '../Avatar';
|
|
import { User } from '../models/misc';
|
|
|
|
export default function ConversationBubble({
|
|
user,
|
|
message,
|
|
isCurrentUser,
|
|
className,
|
|
}: {
|
|
user: User;
|
|
message: string;
|
|
isCurrentUser: boolean;
|
|
className: string;
|
|
}) {
|
|
return (
|
|
<div
|
|
className={`flex rounded-3xl ${
|
|
isCurrentUser ? '' : 'bg-gray-1000'
|
|
} py-7 px-5 ${className}`}
|
|
>
|
|
<Avatar avatar={user.avatar}></Avatar>
|
|
<p className="ml-5">{message}</p>
|
|
</div>
|
|
);
|
|
}
|