Skip to content

Commit 16719d8

Browse files
not-mattHugos68
andauthored
Add MouseEvent types for event handlers (#3556)
Co-authored-by: Hugo Korte <63101006+Hugos68@users.noreply.github.com>
1 parent 334962e commit 16719d8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/skeleton-svelte/src/components/Modal/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ export interface ModalProps extends Omit<dialog.Props, 'id'> {
6969

7070
// Events ---
7171
/** Handle the dialog button click event. */
72-
onclick?: () => void;
72+
onclick?: HTMLButtonAttributes['onclick'];
7373
}

packages/skeleton-svelte/src/components/Popover/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ export interface PopoverProps extends Omit<popover.Props, 'id'> {
5353

5454
// Events ---
5555
/** Handle the popover button click event. */
56-
onclick?: () => void;
56+
onclick?: HTMLButtonAttributes['onclick'];
5757
}

packages/skeleton-svelte/src/components/Tooltip/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export interface TooltipProps extends Omit<tooltip.Props, 'id'> {
5353

5454
// Events ---
5555
/** Handle the tooltip button hover event. */
56-
onmouseover?: () => void;
56+
onmouseover?: HTMLButtonAttributes['onmouseover'];
5757
/** Handle the tooltip button click event. */
58-
onclick?: () => void;
58+
onclick?: HTMLButtonAttributes['onclick'];
5959
}

0 commit comments

Comments
 (0)