aboutsummaryrefslogtreecommitdiff
path: root/src/lib/CommandPalette/CommandPalette.svelte
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-01-23 02:20:50 -0800
committerFuwn <[email protected]>2026-01-23 02:20:50 -0800
commit69753f974994b49b2df059f9b5b401d14db4a8fa (patch)
tree810f5b23d3f2f97c61fdfcdf6a581d2d7d106b32 /src/lib/CommandPalette/CommandPalette.svelte
parentchore(prettier): Remove deprecated pluginSearchDirs option (diff)
downloaddue.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.svelte8
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();