From 78e9fb8e8fde4aa338ed499e0e336a3aee04d90b Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 10 Sep 2022 15:42:35 +0100 Subject: [PATCH] Small fixes --- beta/src/components/MDX/Sandpack/Preview.tsx | 6 +++++- beta/src/styles/sandpack.css | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/beta/src/components/MDX/Sandpack/Preview.tsx b/beta/src/components/MDX/Sandpack/Preview.tsx index 8df69e8e..e4b57e45 100644 --- a/beta/src/components/MDX/Sandpack/Preview.tsx +++ b/beta/src/components/MDX/Sandpack/Preview.tsx @@ -88,6 +88,10 @@ export function Preview({ } } + if (rawError != null && rawError.title === 'Runtime Exception') { + rawError.title = 'Runtime Error'; + } + // It changes too fast, causing flicker. const error = useDebounced(rawError); @@ -179,7 +183,7 @@ export function Preview({ : isExpanded ? 'sticky' : undefined, - top: isExpanded ? '4rem' : undefined, + top: isExpanded ? '2rem' : undefined, }}>