diff --git a/src/components/tableOfContents/tableOfContents.svelte b/src/components/tableOfContents/tableOfContents.svelte new file mode 100644 index 0000000..aadae76 --- /dev/null +++ b/src/components/tableOfContents/tableOfContents.svelte @@ -0,0 +1,28 @@ + + +
+ {#each toc as tocItem (tocItem.id)} + + {tocItem.text} + + {/each} +
diff --git a/src/components/tableOfContents/toc.types.ts b/src/components/tableOfContents/toc.types.ts new file mode 100644 index 0000000..e6547ac --- /dev/null +++ b/src/components/tableOfContents/toc.types.ts @@ -0,0 +1,6 @@ +import type { ToCItem } from "@/markdown/generateToC"; + +export interface TableOfContentsProps { + toc: ToCItem[]; + className?: string; +}