@devtron-labs/devtron-fe-common-lib 0.0.21-beta-1 → 0.0.21-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Common/Helper.d.ts +1 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/Common/Helper.tsx +2 -2
package/dist/Common/Helper.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ export declare function CustomInput({ name, value, error, onChange, onBlur, onFo
|
|
|
42
42
|
}): JSX.Element;
|
|
43
43
|
export declare function handleUTCTime(ts: string, isRelativeTime?: boolean): string;
|
|
44
44
|
export declare function useSearchString(): UseSearchString;
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const closeOnEscKeyPressed: (e: any, actionClose: () => void) => void;
|
|
46
46
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -10095,8 +10095,8 @@ function useSearchString() {
|
|
|
10095
10095
|
}, {});
|
|
10096
10096
|
return { queryParams: queryParams, searchParams: searchParams };
|
|
10097
10097
|
}
|
|
10098
|
-
var
|
|
10099
|
-
if (e.keyCode ===
|
|
10098
|
+
var closeOnEscKeyPressed = function (e, actionClose) {
|
|
10099
|
+
if (e.keyCode === 27 || e.key === 'Escape') {
|
|
10100
10100
|
actionClose();
|
|
10101
10101
|
}
|
|
10102
10102
|
};
|
|
@@ -23414,7 +23414,7 @@ exports.TriggerTypeMap = TriggerTypeMap;
|
|
|
23414
23414
|
exports.URLS = URLS;
|
|
23415
23415
|
exports.VisibleModal = VisibleModal;
|
|
23416
23416
|
exports.VisibleModal2 = VisibleModal2;
|
|
23417
|
-
exports.
|
|
23417
|
+
exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
|
|
23418
23418
|
exports.createGitCommitUrl = createGitCommitUrl;
|
|
23419
23419
|
exports.extractImage = extractImage;
|
|
23420
23420
|
exports.get = get;
|
package/package.json
CHANGED
package/src/Common/Helper.tsx
CHANGED
|
@@ -369,8 +369,8 @@ export function useSearchString(): UseSearchString {
|
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
|
|
372
|
-
export const
|
|
373
|
-
if (e.keyCode ===
|
|
372
|
+
export const closeOnEscKeyPressed = (e: any, actionClose: () => void) => {
|
|
373
|
+
if (e.keyCode === 27 || e.key === 'Escape') {
|
|
374
374
|
actionClose()
|
|
375
375
|
}
|
|
376
376
|
}
|