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

Commit

Permalink
✨ Give Boss Sentience (#1250)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverlevay authored Sep 5, 2023
1 parent e04088c commit 6af4cfb
Show file tree
Hide file tree
Showing 6 changed files with 929 additions and 346 deletions.
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

0 comments on commit 6af4cfb

Please sign in to comment.