fix(editor): update height classes for code editor and MDX preview components

This commit is contained in:
cfngc4594 2025-02-24 12:32:48 +08:00
parent bfb60aba6c
commit 93bcd45c8a
2 changed files with 3 additions and 3 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-130px)]"
className="h-full"
options={mergeOptions}
beforeMount={(monaco) => {
shikiToMonaco(highlighter, monaco);

View File

@ -79,7 +79,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) {
}, [getMdxSource]);
if (isLoading) {
return <Skeleton className="h-full w-full rounded-xl" />;
return <Skeleton className="h-full w-full" />;
}
if (error) {
@ -109,7 +109,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) {
}
return (
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)]">
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-131px)]">
<div className="markdown-body">
<MDXRemote {...mdxSource!} components={components} />
</div>