mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 03:00:58 +08:00
feat(alert): accept Promise for button handler (#25702)
Resolves #25700 Co-authored-by: Sean Perkins <sean@ionic.io>
This commit is contained in:
@ -53,10 +53,12 @@ export type AlertTextareaAttributes = { [key: string]: any };
|
||||
*/
|
||||
export type AlertInputAttributes = { [key: string]: any };
|
||||
|
||||
type AlertButtonOverlayHandler = boolean | void | { [key: string]: any };
|
||||
|
||||
export interface AlertButton {
|
||||
text: string;
|
||||
role?: 'cancel' | 'destructive' | string;
|
||||
cssClass?: string | string[];
|
||||
id?: string;
|
||||
handler?: (value: any) => boolean | void | { [key: string]: any };
|
||||
handler?: (value: any) => AlertButtonOverlayHandler | Promise<AlertButtonOverlayHandler>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user