Skip to content
Snippets Groups Projects
Unverified Commit 76aa3361 authored by Thuc Pham's avatar Thuc Pham Committed by GitHub
Browse files

style: add list style for chat message markdown (#21)

parent e8db041d
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ export default function ChatItem(message: Message) {
return (
<div className="flex items-start gap-4 pt-5">
<ChatAvatar {...message} />
<p className="break-words">{message.content}</p>
<p className="break-words whitespace-pre-wrap">{message.content}</p>
</div>
);
}
......@@ -15,7 +15,7 @@ const MemoizedReactMarkdown: FC<Options> = memo(
export default function Markdown({ content }: { content: string }) {
return (
<MemoizedReactMarkdown
className="prose dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 break-words"
className="prose dark:prose-invert prose-p:leading-relaxed prose-pre:p-0 break-words custom-markdown"
remarkPlugins={[remarkGfm, remarkMath]}
components={{
p({ children }) {
......
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import "./markdown.css";
const inter = Inter({ subsets: ["latin"] });
......
/* Custom CSS for chat message markdown */
.custom-markdown ul {
list-style-type: disc;
margin-left: 20px;
}
.custom-markdown ol {
list-style-type: decimal;
margin-left: 20px;
}
.custom-markdown li {
margin-bottom: 5px;
}
.custom-markdown ol ol {
list-style: lower-alpha;
}
.custom-markdown ul ul,
.custom-markdown ol ol {
margin-left: 20px;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment