mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
dialogs refactored
This commit is contained in:
40
ui/dialogs/dialogs.d.ts
vendored
40
ui/dialogs/dialogs.d.ts
vendored
@ -5,48 +5,28 @@
|
||||
/**
|
||||
* The alert() method displays an alert box with a specified message.
|
||||
* @param message Specifies the text to display in the alert box.
|
||||
* @param options Specifies the options for the alert box. Optional.
|
||||
*/
|
||||
function alert(message: string): promises.Promise<void>;
|
||||
|
||||
/**
|
||||
* The alert() method displays an alert box with a specified options.
|
||||
* @param options Specifies the options for the alert box.
|
||||
*/
|
||||
function alert(options: AlertOptions): promises.Promise<void>;
|
||||
function alert(message: string, options?: AlertOptions): promises.Promise<void>;
|
||||
|
||||
/**
|
||||
* The confirm() method displays a dialog box with a specified message.
|
||||
* @param message Specifies the text to display in the confirm box.
|
||||
* @param options Specifies the options for the confirm box. Optional.
|
||||
*/
|
||||
function confirm(message: string): promises.Promise<boolean>;
|
||||
|
||||
/**
|
||||
* The confirm() method displays a dialog box with a specified message.
|
||||
* @param options Specifies the options for the confirm box.
|
||||
*/
|
||||
function confirm(options: ConfirmOptions): promises.Promise<boolean>;
|
||||
function confirm(message: string, options?: ConfirmOptions): promises.Promise<boolean>;
|
||||
|
||||
/**
|
||||
* The prompt() method displays a dialog box that prompts the visitor for input.
|
||||
* @param message The text to display in the dialog box.
|
||||
* @param options The options for the dialog box. Optional.
|
||||
*/
|
||||
function prompt(message: string): promises.Promise<string>;
|
||||
|
||||
/**
|
||||
* The prompt() method displays a dialog box that prompts the visitor for input.
|
||||
* @param options The options for the dialog box.
|
||||
*/
|
||||
function prompt(options: PromptOptions): promises.Promise<string>;
|
||||
function prompt(message: string, options?: PromptOptions): promises.Promise<string>;
|
||||
|
||||
/**
|
||||
* Provides options for the dialog.
|
||||
*/
|
||||
interface DialogOptions {
|
||||
/**
|
||||
* Gets or sets the alert message.
|
||||
*/
|
||||
message: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the alert title.
|
||||
*/
|
||||
@ -60,7 +40,7 @@
|
||||
/**
|
||||
* Gets or sets the button name.
|
||||
*/
|
||||
buttonName?: string;
|
||||
buttonText?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,17 +50,17 @@
|
||||
/**
|
||||
* Gets or sets the OK button name.
|
||||
*/
|
||||
okButtonName?: string;
|
||||
okButtonText?: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the Cancel button name.
|
||||
*/
|
||||
cancelButtonName?: string;
|
||||
cancelButtonText?: string;
|
||||
|
||||
/**
|
||||
* Gets or sets the Cancel button name.
|
||||
*/
|
||||
otherButtonName?: string;
|
||||
otherButtonText?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user