Skip to content

Commit 78e9fb8

Browse files
committed
Small fixes
1 parent 0f59800 commit 78e9fb8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

beta/src/components/MDX/Sandpack/Preview.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ export function Preview({
8888
}
8989
}
9090

91+
if (rawError != null && rawError.title === 'Runtime Exception') {
92+
rawError.title = 'Runtime Error';
93+
}
94+
9195
// It changes too fast, causing flicker.
9296
const error = useDebounced(rawError);
9397

@@ -179,7 +183,7 @@ export function Preview({
179183
: isExpanded
180184
? 'sticky'
181185
: undefined,
182-
top: isExpanded ? '4rem' : undefined,
186+
top: isExpanded ? '2rem' : undefined,
183187
}}>
184188
<iframe
185189
ref={iframeRef}

beta/src/styles/sandpack.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ html.dark .sp-wrapper {
7979

8080
border-bottom-left-radius: 0.5rem;
8181
border-bottom-right-radius: 0.5rem;
82+
overflow: initial;
8283
}
8384
@media screen and (max-width: 768px) {
8485
.sp-layout > .sp-stack {
@@ -259,7 +260,6 @@ html.dark .sandpack--playground .sp-overlay {
259260

260261
.sp-layout {
261262
min-height: 216px;
262-
overflow: initial !important;
263263
}
264264

265265
.sp-layout > .sp-stack:nth-child(1) {

0 commit comments

Comments
 (0)