Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

✨ Give Boss Sentience #1250

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions frontend/components/Mojt/Message.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { Paper, Stack, Typography } from '@mui/material';

export type MessageType = {
content: string;
sentByYou: boolean;
color: string;
};

export default function Message({ message }: { message: MessageType }) {
return (
<Paper
elevation={3}
style={{
width: 'fit-content',
marginLeft: message.sentByYou ? 'auto' : undefined,
}}
>
<Stack
padding={2}
style={{
width: 'fit-content',
}}
>
<Typography
style={{
color: message.color,
}}
>
{message.sentByYou ? 'Du: ' : 'Boss: '}
{message.content}
</Typography>
</Stack>
</Paper>
);
}
Loading
Loading