This commit is contained in:
louiscklaw
2025-04-26 09:56:29 +08:00
parent a00d1ee7ce
commit 7d70b5826b
17 changed files with 1256 additions and 92 deletions

View File

@@ -0,0 +1,21 @@
import * as React from 'react';
import Box from '@mui/material/Box';
import Markdown from 'react-markdown';
export interface MessageProps {
content: string;
}
export function Message({ content }: MessageProps): React.JSX.Element {
return (
<Box
sx={{
'& h2': { fontWeight: 500, fontSize: '1.5rem', lineHeight: 1.2, mb: 3 },
'& h3': { fontWeight: 500, fontSize: '1.25rem', lineHeight: 1.2, mb: 3 },
'& p': { fontWeight: 400, fontSize: '1rem', lineHeight: 1.5, mb: 2, mt: 0 },
}}
>
<Markdown>{content}</Markdown>
</Box>
);
}