From f6b4dfa709f0258fdfd136844d6d6e48dc50c941 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 7 Apr 2024 02:40:19 -0700 Subject: [PATCH] feat: close mobile toc when link is clicked --- src/lib/components/Toc/TocHeader.svelte | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Toc/TocHeader.svelte b/src/lib/components/Toc/TocHeader.svelte index fb599f4..b247579 100644 --- a/src/lib/components/Toc/TocHeader.svelte +++ b/src/lib/components/Toc/TocHeader.svelte @@ -15,10 +15,16 @@ }; $: currentDisplayed = $tocStore.activeItem ? $tocStore.activeItem.text : placeholder; + + let value: string; + + const close = () => { + value = ''; + };