mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
Update the dialogs.d.ts so that everything can use the cancelable. ;-)
This commit is contained in:
21
ui/dialogs/dialogs.d.ts
vendored
21
ui/dialogs/dialogs.d.ts
vendored
@ -81,11 +81,21 @@ declare module "ui/dialogs" {
|
|||||||
* @param options The options for the dialog box.
|
* @param options The options for the dialog box.
|
||||||
*/
|
*/
|
||||||
export function action(options: ActionOptions): Promise<string>;
|
export function action(options: ActionOptions): Promise<string>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides options for the dialog.
|
||||||
|
*/
|
||||||
|
export interface CancelableOptions {
|
||||||
|
/**
|
||||||
|
* [Android only] Gets or sets if the dialog can be canceled by taping outside of the dialog.
|
||||||
|
*/
|
||||||
|
cancelable?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides options for the dialog.
|
* Provides options for the dialog.
|
||||||
*/
|
*/
|
||||||
export interface ActionOptions {
|
export interface ActionOptions extends CancelableOptions {
|
||||||
/**
|
/**
|
||||||
* Gets or sets the dialog title.
|
* Gets or sets the dialog title.
|
||||||
*/
|
*/
|
||||||
@ -110,7 +120,7 @@ declare module "ui/dialogs" {
|
|||||||
/**
|
/**
|
||||||
* Provides options for the dialog.
|
* Provides options for the dialog.
|
||||||
*/
|
*/
|
||||||
export interface DialogOptions {
|
export interface DialogOptions extends CancelableOptions {
|
||||||
/**
|
/**
|
||||||
* Gets or sets the dialog title.
|
* Gets or sets the dialog title.
|
||||||
*/
|
*/
|
||||||
@ -120,12 +130,7 @@ declare module "ui/dialogs" {
|
|||||||
* Gets or sets the dialog message.
|
* Gets or sets the dialog message.
|
||||||
*/
|
*/
|
||||||
message?: string;
|
message?: string;
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets if the Android dialog can be canceled via clicking outside of it
|
|
||||||
* defaults to true.
|
|
||||||
*/
|
|
||||||
cancelable?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user