@devtron-labs/devtron-fe-common-lib 1.1.4-beta-1 → 1.1.4-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.
@@ -1,5 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface BackdropProps {
3
3
  children: ReactNode;
4
+ /**
5
+ * @param onEscape: please wrap in a useCallback, with respective dependencies or []
6
+ */
4
7
  onEscape: () => void;
5
8
  }
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode, SVGProps } from 'react';
1
+ import { FunctionComponent, ReactNode, SVGProps, SyntheticEvent } from 'react';
2
2
  import { ButtonProps } from '../Button';
3
3
  export declare enum ConfirmationModalVariantType {
4
4
  info = "info",
@@ -7,7 +7,7 @@ export declare enum ConfirmationModalVariantType {
7
7
  custom = "custom"
8
8
  }
9
9
  interface CommonButtonProps extends Pick<ButtonProps, 'text'>, Partial<Pick<ButtonProps, 'startIcon' | 'endIcon'>> {
10
- onClick: (e?: any) => void;
10
+ onClick: (e?: SyntheticEvent) => void;
11
11
  }
12
12
  interface CustomInputConfig {
13
13
  identifier: string;
@@ -34,9 +34,9 @@ type CustomInputConfigOrChildrenType = {
34
34
  children?: never;
35
35
  };
36
36
  export type ConfirmationModalProps = {
37
- title: ReactNode;
37
+ title: string;
38
38
  subtitle: ReactNode;
39
- handleClose: (e?: any) => void;
39
+ handleClose: (e?: SyntheticEvent) => void;
40
40
  showConfirmationModal: boolean;
41
41
  } & ({
42
42
  variant: Exclude<ConfirmationModalVariantType, ConfirmationModalVariantType.custom>;
@@ -45,8 +45,6 @@ export type ConfirmationModalProps = {
45
45
  } | {
46
46
  variant: ConfirmationModalVariantType.custom;
47
47
  Icon: FunctionComponent<SVGProps<SVGSVGElement>>;
48
- customInputConfig?: never;
49
- children?: ReactNode;
50
48
  buttonConfig: ButtonConfig<Pick<ButtonProps, 'isLoading' | 'disabled' | 'style'>, Pick<ButtonProps, 'disabled' | 'style'>>;
51
49
  }) & CustomInputConfigOrChildrenType;
52
50
  export {};