@@ -5,7 +5,12 @@ import { BehaviorSubject } from 'rxjs';
55import { PopupProps } from './popup' ;
66
77export interface PopupApi {
8- confirm ( title : string , message : string | React . ComponentType ) : Promise < boolean > ;
8+ confirm (
9+ title : string ,
10+ message : string | React . ComponentType ,
11+ customIcon ?: { name : string , color : string } ,
12+ titleColor ?: string ,
13+ ) : Promise < boolean > ;
914 prompt (
1015 title : string ,
1116 form : ( formApi : FormApi ) => RenderReturn , settings ?: {
@@ -25,7 +30,12 @@ export class PopupManager implements PopupApi {
2530 return this . popupPropsSubject . asObservable ( ) ;
2631 }
2732
28- public confirm ( title : string , message : string | React . ComponentType ) : Promise < boolean > {
33+ public confirm (
34+ title : string ,
35+ message : string | React . ComponentType ,
36+ customIcon ?: { name : string , color : string } ,
37+ titleColor ?: string ,
38+ ) : Promise < boolean > {
2939 const content = typeof message === 'string' && ( ( ) => ( < p > { message } </ p > ) ) || message as React . ComponentType ;
3040
3141 return new Promise ( ( resolve ) => {
@@ -45,6 +55,8 @@ export class PopupManager implements PopupApi {
4555 < button qe-id = 'argo-popup-cancel-button' className = 'argo-button argo-button--base-o' onClick = { ( ) => closeAndResolve ( false ) } > Cancel</ button >
4656 </ div >
4757 ) ,
58+ titleColor : titleColor ? titleColor : 'normal' ,
59+ icon : customIcon ? { name : customIcon ?. name , color : customIcon ?. color } : undefined ,
4860 } ) ;
4961 } ) ;
5062 }
0 commit comments