Small fixes

This commit is contained in:
Dan Abramov
2022-09-10 15:42:35 +01:00
parent 0f598008d7
commit 78e9fb8e8f
2 changed files with 6 additions and 2 deletions

View File

@@ -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,
}}>
<iframe
ref={iframeRef}

View File

@@ -79,6 +79,7 @@ html.dark .sp-wrapper {
border-bottom-left-radius: 0.5rem;
border-bottom-right-radius: 0.5rem;
overflow: initial;
}
@media screen and (max-width: 768px) {
.sp-layout > .sp-stack {
@@ -259,7 +260,6 @@ html.dark .sandpack--playground .sp-overlay {
.sp-layout {
min-height: 216px;
overflow: initial !important;
}
.sp-layout > .sp-stack:nth-child(1) {