feat: add fullscreen custom css editor

This commit is contained in:
SethBurkart123
2025-02-24 16:51:40 +11:00
parent 5051d04451
commit edb0a0f929
3 changed files with 40 additions and 7 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
let editor = $state<HTMLDivElement | null>(null)
let view: EditorView | null = null;
let editorTheme = new Compartment();
let { value, onChange } = $props<{value: string, onChange: (value: string) => void}>()
let { value, onChange, className } = $props<{value: string, onChange: (value: string) => void, className?: string}>()
function createEditorState(initialContents: string) {
let extensions = [
@@ -91,4 +91,4 @@
})
</script>
<div class="rounded-lg text-[13px] overflow-clip w-full bg-white dark:bg-zinc-900" bind:this={editor}></div>
<div class={`rounded-lg text-[13px] overflow-clip w-full bg-white dark:bg-zinc-900 ${className}`} bind:this={editor}></div>