mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 16:43:16 +00:00
simplifies the APIKeyModal communication and state management, adds
conversation components
This commit is contained in:
25
frontend/src/conversation/ConversationBubble.tsx
Normal file
25
frontend/src/conversation/ConversationBubble.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user