Skip to content

Commit

Permalink
expose more button events
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte committed May 21, 2024
1 parent 47e0ce9 commit d387623
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/bits-ui/src/lib/bits/button/components/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
on:keyup
on:mouseenter
on:mouseleave
on:mousedown
on:pointerdown
on:mouseup
on:pointerup
tabindex="0"
use:builderActions={{ builders }}
{...getAttrs(builders)}
Expand All @@ -47,6 +51,10 @@
on:keyup
on:mouseenter
on:mouseleave
on:mousedown
on:pointerdown
on:mouseup
on:pointerup
tabindex="0"
{...$$restProps}
{...attrs}
Expand Down
4 changes: 4 additions & 0 deletions packages/bits-ui/src/lib/bits/button/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ export type ButtonEvents = {
keyup: ButtonEventHandler<KeyboardEvent>;
mouseenter: ButtonEventHandler<MouseEvent>;
mouseleave: ButtonEventHandler<MouseEvent>;
mousedown: ButtonEventHandler<MouseEvent>;
mouseup: ButtonEventHandler<MouseEvent>;
pointerdown: ButtonEventHandler<PointerEvent>;
pointerup: ButtonEventHandler<PointerEvent>;
};

0 comments on commit d387623

Please sign in to comment.