@base-stone/hooks 0.8.5 → 0.8.6
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.
|
@@ -22,14 +22,6 @@ declare interface GlobalTableConfig {
|
|
|
22
22
|
|
|
23
23
|
declare type MapData<T extends string | number = string | number> = Map<T, string | number | undefined>;
|
|
24
24
|
|
|
25
|
-
declare interface ModalConfig {
|
|
26
|
-
width: number;
|
|
27
|
-
title: string;
|
|
28
|
-
maskClosable?: boolean;
|
|
29
|
-
centered?: boolean;
|
|
30
|
-
destroyOnHidden?: boolean;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
25
|
declare type ModalInstance<T = any> = {
|
|
34
26
|
visible: boolean;
|
|
35
27
|
data: T;
|
|
@@ -47,6 +39,14 @@ declare type ModalInstance<T = any> = {
|
|
|
47
39
|
close: () => void;
|
|
48
40
|
};
|
|
49
41
|
|
|
42
|
+
export declare interface ModalProps {
|
|
43
|
+
width: number;
|
|
44
|
+
title: string;
|
|
45
|
+
maskClosable?: boolean;
|
|
46
|
+
centered?: boolean;
|
|
47
|
+
destroyOnHidden?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
50
|
export declare interface QueryParamsData {
|
|
51
51
|
pageNo: number;
|
|
52
52
|
pageSize: number;
|
|
@@ -125,7 +125,7 @@ declare interface TableResponse<T> {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
export declare function useCreateModal<const T extends Record<string,
|
|
128
|
+
export declare function useCreateModal<const T extends Record<string, ModalProps>>(configs: T): {
|
|
129
129
|
[K in keyof T as `${string & K}Modal`]: ModalInstance;
|
|
130
130
|
} & {
|
|
131
131
|
open: (type: keyof T, data?: any) => void;
|