diff --git a/src/Repl.vue b/src/Repl.vue index f07465ba..66138ec7 100644 --- a/src/Repl.vue +++ b/src/Repl.vue @@ -40,6 +40,10 @@ export interface Props { autoSaveText?: string | false monacoOptions?: monaco.editor.IStandaloneEditorConstructionOptions } + splitPaneOptions?: { + codeTogglerText?: string + outputTogglerText?: string + } } const autoSave = defineModel({ default: true }) @@ -57,6 +61,7 @@ const props = withDefaults(defineProps(), { layout: 'horizontal', previewOptions: () => ({}), editorOptions: () => ({}), + splitPaneOptions: () => ({}), }) if (!props.editor) { diff --git a/src/SplitPane.vue b/src/SplitPane.vue index 6723bd86..8b49a09a 100644 --- a/src/SplitPane.vue +++ b/src/SplitPane.vue @@ -9,8 +9,7 @@ const containerRef = useTemplateRef('container') const previewRef = inject(injectKeyPreviewRef)! // mobile only -const { store } = inject(injectKeyProps)! -const showOutput = computed(() => store.value.showOutput) +const { store, splitPaneOptions } = inject(injectKeyProps)! const state = reactive({ dragging: false, @@ -66,7 +65,7 @@ function changeViewSize() { class="split-pane" :class="{ dragging: state.dragging, - 'show-output': showOutput, + 'show-output': store.showOutput, vertical: isVertical, }" @mousemove="dragMove" @@ -90,8 +89,12 @@ function changeViewSize() { -