diff --git a/common/images/widget/alert-widget-result.png b/common/images/widget/alert-widget-result.png new file mode 100644 index 00000000000..ad170f87104 Binary files /dev/null and b/common/images/widget/alert-widget-result.png differ diff --git a/guides/v2.1/javascript-dev-guide/widgets/widget_alert.md b/guides/v2.1/javascript-dev-guide/widgets/widget_alert.md index b95c4da4985..13fe3437e16 100644 --- a/guides/v2.1/javascript-dev-guide/widgets/widget_alert.md +++ b/guides/v2.1/javascript-dev-guide/widgets/widget_alert.md @@ -56,6 +56,7 @@ The alert widget has the following options: - [content] - [focus] - [title] +- [modalClass] ### `actions` {#alert_actions} Widget callbacks. @@ -105,14 +106,83 @@ The title of the alert window. **Default value**: `''` +### `modalClass` {#alert_modalClass} +The CSS class of the alert window. + +**Type**: String. + +**Default value**: `'confirm'` + ## Events {#alert_events} The alert widget implements a single event: the `always` callback. +The `always` callback is invoked when a modal window is closed. ## Keyboard navigation {#alert_key_navigation} The keyboard navigation for the alert windows is similar to the [navigation of the modal widget]. +## Code Sample + +### Code sample of standalone initialization + +```html +
+ + +``` + +### Code sample of initialization on an element + +```html + + + +``` + +## Result + + + [Magento modal widget]: {{ page.baseurl }}/javascript-dev-guide/widgets/widget_modal.html [`