fix(editor): adjust height calculation for code editor and MDX preview components

This commit is contained in:
cfngc4594 2025-02-24 11:45:31 +08:00
parent fa15a6628e
commit 3b89e5de0e
2 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ export default function CodeEditor() {
defaultValue={DEFAULT_VALUE[language]}
path={DEFAULT_PATH[language]}
theme={resolvedTheme === "light" ? "github-light-default" : "github-dark-default"}
className="h-[calc(100vh-112px)]"
className="h-[calc(100vh-130px)]"
options={mergeOptions}
beforeMount={(monaco) => {
shikiToMonaco(highlighter, monaco);

View File

@ -109,7 +109,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) {
}
return (
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-112px)]">
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)]">
<div className="markdown-body">
<MDXRemote {...mdxSource!} components={components} />
</div>