Skip to content

Commit

Permalink
fix: use pre-defined type for event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanahiro committed Nov 21, 2024
1 parent c4d8353 commit 4462d25
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/maplibre/controls/CustomControl/Icon.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import type { MouseEventHandler } from 'svelte/elements';
let {
children,
onclick,
oncontextmenu,
className
}: { children?: Snippet; className: string; onclick?: () => void; oncontextmenu?: () => void } = $props();
}: {
children?: Snippet;
className: string;
onclick?: MouseEventHandler<HTMLButtonElement>;
oncontextmenu?: MouseEventHandler<HTMLButtonElement>;
} = $props();
</script>

<button
Expand Down

0 comments on commit 4462d25

Please sign in to comment.