Skip to content

Commit

Permalink
Add pointerenter events to Menu items
Browse files Browse the repository at this point in the history
This includes all components with events inheriting from `ItemEvents`
  • Loading branch information
RedPhoenixQ committed Mar 14, 2024
1 parent 913d4be commit 14f1041
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-checkbox-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</svelte:element>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-radio-item.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
on:m-pointerdown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/components/menu-sub-trigger.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
on:m-keydown={dispatch}
on:m-pointerleave={dispatch}
on:m-pointermove={dispatch}
on:pointerenter
>
<slot {builder} />
</div>
Expand Down
1 change: 1 addition & 0 deletions src/lib/bits/menu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type ItemEvents<T extends Element = HTMLDivElement> = {
pointerdown: CustomEventHandler<PointerEvent, T>;
pointerleave: CustomEventHandler<PointerEvent, T>;
pointermove: CustomEventHandler<PointerEvent, T>;
pointerenter: CustomEventHandler<PointerEvent, T>;
};

type CheckboxItemEvents = ItemEvents;
Expand Down

0 comments on commit 14f1041

Please sign in to comment.