Models a message box's message, title and options.
Constructor methods
constructor(message: string, title?: string, options?: Array<string>, autoclose?: boolean, settings?: Object): Box
Parameters
-
message: string
-
title?: string optional
-
options?: Array<string> optional
-
autoclose?: boolean optional
-
settings?: Object optional
Returns
Box
Properties
public static defaultOptions: Array<string>
The options to display in the message box if none are specified.
public static defaultTitle: string
The title to be used for the message box if one is not provided.
public static defaultViewMarkup: string
The markup for the message box's view.
Methods
public getView(): HTMLElement
Provides the view to the composition system.
Returns
HTMLElement
The view of the message box.
public selectOption(dialogResult: string)
Selects an option and closes the message box, returning the selected option through the dialog system's promise.
Parameters
-
dialogResult: string
The result to select.
public static setDefaults(settings: Object)
Sets the classes and styles used throughout the message box markup.
Parameters
-
settings: Object
A settings object containing the following optional properties: buttonClass, primaryButtonClass, secondaryButtonClass, class, style.
public static setViewUrl(viewUrl: string)
Configures a custom view to use when displaying message boxes.
Parameters