diff --git a/src/output/Preview.vue b/src/output/Preview.vue index d69f08a1..2be91663 100644 --- a/src/output/Preview.vue +++ b/src/output/Preview.vue @@ -20,6 +20,7 @@ const props = defineProps<{ show: boolean; ssr: boolean }>() const store = inject('store') as Store const clearConsole = inject('clear-console') as Ref +const theme = inject('theme') as Ref<'dark' | 'light'> const previewOptions = inject('preview-options') as Props['previewOptions'] @@ -85,6 +86,7 @@ function createSandbox() { importMap.imports.vue = store.state.vueRuntimeURL } const sandboxSrc = srcdoc + .replace(//, ``) .replace(//, JSON.stringify(importMap)) .replace( //, @@ -279,7 +281,12 @@ defineExpose({ reload }) @@ -292,4 +299,7 @@ defineExpose({ reload }) border: none; background-color: #fff; } +.iframe-container.dark :deep(iframe) { + background-color: #1e1e1e; +}