mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
6d1de58748
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
17 lines
706 B
TypeScript
17 lines
706 B
TypeScript
import { Markdown, UserMessageProps } from "@copilotkit/react-ui";
|
|
import { Avatar, Format, AvatarSize} from "@leafygreen-ui/avatar";
|
|
import Card from "@leafygreen-ui/card";
|
|
|
|
export const CustomUserMessage = (props: UserMessageProps) => {
|
|
const wrapperStyles = "flex items-end gap-2 justify-end mt-4 w-full";
|
|
const messageStyles = "bg-emerald-500 flex items-end justify-end text-white"
|
|
const avatarStyles = "text-sm bg-emerald-500"
|
|
|
|
return (
|
|
<div className={wrapperStyles}>
|
|
<Card className={messageStyles}><Markdown content={props.message?.content || ""} /></Card>
|
|
<Avatar format={Format.Icon} glyph="Person" size={AvatarSize.XLarge} className={avatarStyles} />
|
|
</div>
|
|
);
|
|
};
|