@arkyn/components 1.3.54 → 1.3.55

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
1
1
  import { DrawerContextProps } from "@arkyn/types";
2
- type OpenDrawerProps = (data?: any) => void;
2
+ type OpenDrawerProps<T = any> = (data?: T) => void;
3
3
  declare function useDrawer<T = any>(): DrawerContextProps<T>;
4
4
  declare function useDrawer<T = any>(key: string): {
5
5
  drawerIsOpen: boolean;
6
6
  drawerData: T;
7
- openDrawer: OpenDrawerProps;
7
+ openDrawer: OpenDrawerProps<T>;
8
8
  closeDrawer: () => void;
9
9
  };
10
10
  export { useDrawer };
@@ -1 +1 @@
1
- {"version":3,"file":"useDrawer.d.ts","sourceRoot":"","sources":["../../src/hooks/useDrawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKlD,KAAK,eAAe,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAE5C,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACrD,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,EACxB,GAAG,EAAE,MAAM,GACV;IACD,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC;IACd,UAAU,EAAE,eAAe,CAAC;IAC5B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AA6BF,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"useDrawer.d.ts","sourceRoot":"","sources":["../../src/hooks/useDrawer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAKlD,KAAK,eAAe,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AAEnD,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,KAAK,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACrD,iBAAS,SAAS,CAAC,CAAC,GAAG,GAAG,EACxB,GAAG,EAAE,MAAM,GACV;IACD,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,CAAC,CAAC;IACd,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,CAAC;AA6BF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { ModalContextProps } from "@arkyn/types";
2
- type OpenModalProps = (data?: any) => void;
2
+ type OpenModalProps<T = any> = (data?: T) => void;
3
3
  declare function useModal<T = any>(): ModalContextProps<T>;
4
4
  declare function useModal<T = any>(key: string): {
5
5
  modalIsOpen: boolean;
6
6
  modalData: T;
7
- openModal: OpenModalProps;
7
+ openModal: OpenModalProps<T>;
8
8
  closeModal: () => void;
9
9
  };
10
10
  export { useModal };
@@ -1 +1 @@
1
- {"version":3,"file":"useModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,KAAK,cAAc,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAE3C,iBAAS,QAAQ,CAAC,CAAC,GAAG,GAAG,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACnD,iBAAS,QAAQ,CAAC,CAAC,GAAG,GAAG,EACvB,GAAG,EAAE,MAAM,GACV;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC;IACb,SAAS,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AA6BF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"useModal.d.ts","sourceRoot":"","sources":["../../src/hooks/useModal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKjD,KAAK,cAAc,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;AAElD,iBAAS,QAAQ,CAAC,CAAC,GAAG,GAAG,KAAK,iBAAiB,CAAC,CAAC,CAAC,CAAC;AACnD,iBAAS,QAAQ,CAAC,CAAC,GAAG,GAAG,EACvB,GAAG,EAAE,MAAM,GACV;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,CAAC,CAAC;IACb,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AA6BF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "1.3.54",
3
+ "version": "1.3.55",
4
4
  "main": "./dist/bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Lucas Gonçalves",
@@ -3,7 +3,7 @@ import { useContext } from "react";
3
3
 
4
4
  import { DrawerContext } from "../context/DrawerContext";
5
5
 
6
- type OpenDrawerProps = (data?: any) => void;
6
+ type OpenDrawerProps<T = any> = (data?: T) => void;
7
7
 
8
8
  function useDrawer<T = any>(): DrawerContextProps<T>;
9
9
  function useDrawer<T = any>(
@@ -11,7 +11,7 @@ function useDrawer<T = any>(
11
11
  ): {
12
12
  drawerIsOpen: boolean;
13
13
  drawerData: T;
14
- openDrawer: OpenDrawerProps;
14
+ openDrawer: OpenDrawerProps<T>;
15
15
  closeDrawer: () => void;
16
16
  };
17
17
 
@@ -3,7 +3,7 @@ import { useContext } from "react";
3
3
 
4
4
  import { ModalContext } from "../context/ModalContext";
5
5
 
6
- type OpenModalProps = (data?: any) => void;
6
+ type OpenModalProps<T = any> = (data?: T) => void;
7
7
 
8
8
  function useModal<T = any>(): ModalContextProps<T>;
9
9
  function useModal<T = any>(
@@ -11,7 +11,7 @@ function useModal<T = any>(
11
11
  ): {
12
12
  modalIsOpen: boolean;
13
13
  modalData: T;
14
- openModal: OpenModalProps;
14
+ openModal: OpenModalProps<T>;
15
15
  closeModal: () => void;
16
16
  };
17
17