feat(playground): enhance Markdown component with improved styling and example formatting

This commit is contained in:
ngc2207 2025-01-11 02:09:29 +08:00
parent 1ae17e699b
commit ededbe8f1b
2 changed files with 12 additions and 6 deletions

View File

@ -1,13 +1,14 @@
import { Suspense } from "react";
import { MDXRemote } from "next-mdx-remote/rsc";
import "github-markdown-css/github-markdown-dark.css";
import "../components/style/markdown.css";
export default function Markdown() {
return (
<Suspense fallback={<>Loading...</>}>
<div className="h-full w-full p-8 markdown-body">
<MDXRemote
source={`# 两数之和
source={`# 1. 两数之和
## 📝
@ -19,12 +20,13 @@ export default function Markdown() {
## 💡
\`\`\`
nums = [2, 7, 11, 15], target = 9
[0, 1]
nums[0] + nums[1] == 9 [0, 1]
\`\`\`
### 1
> nums = [2,7,11,15], target = 9
>
> [0,1]
>
> nums[0] + nums[1] == 9 [0, 1]
`}
/>
</div>

View File

@ -0,0 +1,4 @@
.markdown-body {
background-color: #282c34;
border: #3e4452;
}