@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.
@@ -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 closeOnKeyPressed: (e: any, actionClose: () => void, keyCode: number, key: string) => void;
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 closeOnKeyPressed = function (e, actionClose, keyCode, key) {
10099
- if (e.keyCode === keyCode || e.key === key) {
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.closeOnKeyPressed = closeOnKeyPressed;
23417
+ exports.closeOnEscKeyPressed = closeOnEscKeyPressed;
23418
23418
  exports.createGitCommitUrl = createGitCommitUrl;
23419
23419
  exports.extractImage = extractImage;
23420
23420
  exports.get = get;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.21-beta-1",
3
+ "version": "0.0.21-beta-2",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -369,8 +369,8 @@ export function useSearchString(): UseSearchString {
369
369
  }
370
370
 
371
371
 
372
- export const closeOnKeyPressed = (e: any, actionClose: () => void, keyCode: number, key: string) => {
373
- if (e.keyCode === keyCode || e.key === key) {
372
+ export const closeOnEscKeyPressed = (e: any, actionClose: () => void) => {
373
+ if (e.keyCode === 27 || e.key === 'Escape') {
374
374
  actionClose()
375
375
  }
376
376
  }