@ansible/ansible-ui-framework 0.0.536 → 0.0.537
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,7 @@ export interface IPageActionCommon {
|
|
8
8
|
shortLabel?: string;
|
9
9
|
tooltip?: string;
|
10
10
|
isDanger?: boolean;
|
11
|
+
ouiaId?: string;
|
11
12
|
}
|
12
13
|
export interface IPageActionSeperator {
|
13
14
|
type: PageActionType.seperator;
|
@@ -23,7 +24,7 @@ type IPageActionWithOnClick = IPageActionCommon & {
|
|
23
24
|
type: PageActionType.button;
|
24
25
|
variant?: ButtonVariant;
|
25
26
|
isDisabled?: string | undefined;
|
26
|
-
onClick: () => void;
|
27
|
+
onClick: (() => void) | (() => Promise<unknown>);
|
27
28
|
href?: never;
|
28
29
|
};
|
29
30
|
export type IPageActionButton = IPageActionWithLink | IPageActionWithOnClick;
|
@@ -43,7 +44,7 @@ type IPageSingleActionWithLink<T extends object> = IPageActionCommon & {
|
|
43
44
|
type IPageSingleActionWithOnClick<T extends object> = IPageActionCommon & {
|
44
45
|
type: PageActionType.single;
|
45
46
|
variant?: ButtonVariant;
|
46
|
-
onClick: (item: T) => void;
|
47
|
+
onClick: (item: T) => void | (() => Promise<unknown>);
|
47
48
|
href?: never;
|
48
49
|
isDisabled?: (item: T) => string | undefined;
|
49
50
|
isHidden?: (item: T) => boolean;
|