We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e06c60 commit dddc8deCopy full SHA for dddc8de
1 file changed
index.d.ts
@@ -5,6 +5,8 @@ declare module 'focus-trap' {
5
* returns a DOM node.
6
*/
7
export type FocusTarget = HTMLElement | string | { (): HTMLElement };
8
+
9
+ type MouseEventToBoolean = (event: MouseEvent) => boolean
10
11
export interface Options {
12
/**
@@ -58,7 +60,7 @@ declare module 'focus-trap' {
58
60
* a click outside the focus trap will not be prevented,
59
61
* even when `clickOutsideDeactivates` is `false`.
62
- allowOutsideClick?: boolean | (event: MouseEvent) => boolean;
63
+ allowOutsideClick?: boolean | MouseEventToBoolean;
64
65
* By default, focus() will scroll to the element if not in viewport.
66
* It can produce unintended effects like scrolling back to the top of a modal.
0 commit comments