fix(editor): adjust height calculation for code editor and MDX preview components
This commit is contained in:
		
							parent
							
								
									fa15a6628e
								
							
						
					
					
						commit
						3b89e5de0e
					
				| @ -102,7 +102,7 @@ export default function CodeEditor() { | |||||||
|       defaultValue={DEFAULT_VALUE[language]} |       defaultValue={DEFAULT_VALUE[language]} | ||||||
|       path={DEFAULT_PATH[language]} |       path={DEFAULT_PATH[language]} | ||||||
|       theme={resolvedTheme === "light" ? "github-light-default" : "github-dark-default"} |       theme={resolvedTheme === "light" ? "github-light-default" : "github-dark-default"} | ||||||
|       className="h-[calc(100vh-112px)]" |       className="h-[calc(100vh-130px)]" | ||||||
|       options={mergeOptions} |       options={mergeOptions} | ||||||
|       beforeMount={(monaco) => { |       beforeMount={(monaco) => { | ||||||
|         shikiToMonaco(highlighter, monaco); |         shikiToMonaco(highlighter, monaco); | ||||||
|  | |||||||
| @ -109,7 +109,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   return ( |   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"> |       <div className="markdown-body"> | ||||||
|         <MDXRemote {...mdxSource!} components={components} /> |         <MDXRemote {...mdxSource!} components={components} /> | ||||||
|       </div> |       </div> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user