aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/markdown.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/components/markdown.svelte')
-rw-r--r--src/lib/components/markdown.svelte13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/components/markdown.svelte b/src/lib/components/markdown.svelte
new file mode 100644
index 0000000..204815b
--- /dev/null
+++ b/src/lib/components/markdown.svelte
@@ -0,0 +1,13 @@
+<script lang="ts">
+ export let file: string | null = null
+</script>
+
+{#if file}
+ <section data-markdown={file} />
+{:else}
+ <section data-markdown>
+ <div data-template>
+ <slot />
+ </div>
+ </section>
+{/if}