You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: core/src/components/cat-notification/cat-notification.tsx
+27-11
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,12 @@ import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';
4
4
interfaceToastRef{
5
5
toast?: {
6
6
showToast: ()=>void;
7
-
hideToast: ()=>void;
7
+
hideToast: (result?: any)=>void;
8
8
};
9
9
}
10
10
11
+
typeToastResultRef=ToastRef&{result?: any};
12
+
11
13
exportinterfaceToastOptions{
12
14
/** The appearance mode of the notification. (Default: `dark`) */
13
15
mode: 'dark'|'light';
@@ -27,8 +29,8 @@ export interface ToastOptions {
27
29
onAction: (toast: ToastRef)=>void;
28
30
/** Callback executed when the notification is clicked. Receives a reference to the notification as first argument. */
29
31
onClick: (toast: ToastRef)=>void;
30
-
/** Callback executed when the notification is dismissed. Receives a reference to the notification as first argument. */
31
-
onDismiss: (toast: ToastRef)=>void;
32
+
/** Callback executed when the notification is dismissed. Receives a reference to the notification as first argument and an optional result as second argument. */
33
+
onDismiss: (toast: ToastRef,result?: any)=>void;
32
34
}
33
35
34
36
/**
@@ -49,17 +51,23 @@ export class CatNotificationService {
0 commit comments