diff options
| author | Fuwn <[email protected]> | 2026-01-23 02:20:50 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-23 02:20:50 -0800 |
| commit | 69753f974994b49b2df059f9b5b401d14db4a8fa (patch) | |
| tree | 810f5b23d3f2f97c61fdfcdf6a581d2d7d106b32 /src/lib/CommandPalette/CommandPalette.svelte | |
| parent | chore(prettier): Remove deprecated pluginSearchDirs option (diff) | |
| download | due.moe-69753f974994b49b2df059f9b5b401d14db4a8fa.tar.xz due.moe-69753f974994b49b2df059f9b5b401d14db4a8fa.zip | |
refactor: Migrate event handlers to new Svelte 5 syntax
Diffstat (limited to 'src/lib/CommandPalette/CommandPalette.svelte')
| -rw-r--r-- | src/lib/CommandPalette/CommandPalette.svelte | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/CommandPalette/CommandPalette.svelte b/src/lib/CommandPalette/CommandPalette.svelte index 566dd9d9..735941fb 100644 --- a/src/lib/CommandPalette/CommandPalette.svelte +++ b/src/lib/CommandPalette/CommandPalette.svelte @@ -134,13 +134,13 @@ }; </script> -<svelte:window on:click={handleClickOutside} /> +<svelte:window onclick={handleClickOutside} /> {#if isVisible} <!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions --> <div class="command-palette-overlay {open ? 'fade-in' : 'fade-out'}" - on:click={() => (open = false)} + onclick={() => (open = false)} ></div> <div class="dropdown {open ? 'fade-in' : 'fade-out'}"> @@ -150,7 +150,7 @@ bind:value={search} class="command-input" placeholder="Search" - on:keydown={handleKey} + onkeydown={handleKey} /> <div class="results-container"> @@ -161,7 +161,7 @@ in:fly={{ y: 20, duration: 150, delay: i * 30 }} out:fly={{ y: -20, duration: 150 }} animate:flip={{ duration: 200 }} - on:click={(e) => { + onclick={(e) => { if (item.preventDefault) e.preventDefault(); if (item.onClick) item.onClick(); |