@mantine/utils
Advanced tools
Comparing version 5.5.2 to 5.5.3
@@ -9,3 +9,3 @@ 'use strict'; | ||
if (typeof callback !== "function" || !options.active) { | ||
return noop.noop; | ||
return options.onKeyDown || noop.noop; | ||
} | ||
@@ -15,3 +15,3 @@ return (event) => { | ||
if (event.key === "Escape") { | ||
callback(); | ||
callback(event); | ||
(_a = options.onTrigger) == null ? void 0 : _a.call(options); | ||
@@ -18,0 +18,0 @@ } |
@@ -5,3 +5,3 @@ import { noop } from '../noop/noop.js'; | ||
if (typeof callback !== "function" || !options.active) { | ||
return noop; | ||
return options.onKeyDown || noop; | ||
} | ||
@@ -11,3 +11,3 @@ return (event) => { | ||
if (event.key === "Escape") { | ||
callback(); | ||
callback(event); | ||
(_a = options.onTrigger) == null ? void 0 : _a.call(options); | ||
@@ -14,0 +14,0 @@ } |
@@ -5,5 +5,6 @@ import React from 'react'; | ||
onTrigger?(): void; | ||
onKeyDown?(event: React.KeyboardEvent<any>): void; | ||
} | ||
export declare function closeOnEscape(callback?: () => void, options?: Options): (event: React.KeyboardEvent<any>) => void; | ||
export declare function closeOnEscape(callback?: (event: any) => void, options?: Options): (event: React.KeyboardEvent<any>) => void; | ||
export {}; | ||
//# sourceMappingURL=close-on-escape.d.ts.map |
{ | ||
"name": "@mantine/utils", | ||
"version": "5.5.2", | ||
"version": "5.5.3", | ||
"main": "cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "esm/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86355
787