Skip to content

Commit

Permalink
Grammar and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dobooth authored Sep 17, 2019
1 parent 1d35743 commit 4d6ec1b
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions guides/v2.2/ui_comp_guide/components/ui-modal.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,12 @@ The following sample is an example of the configuration for a simple modal windo

#### Result

As result, a Button component `Open modal` is added, that opens on click a modal window with a `slide` effect.
The Button component `Open modal` is added, that onClick, opens a modal window with a `slide` effect.

![Slide Modal]({{ site.baseurl }}/common/images/ui_comps/slide_modal_result.png)

### Component with extended settings

The following sample is an example of the configuration for a notification modal window, used for Backend notifications:

```xml
<modal name="test_notification">
<settings>
Expand Down Expand Up @@ -175,24 +173,24 @@ The following sample is an example of the configuration for a notification modal

#### Result

As result, the modal window auto opens on page load with a `popup` effect.
As a result, the modal window auto-opens on page load with a `popup` effect.

![Notification Modal]({{ site.baseurl }}/common/images/ui_comps/notification_modal_result.png)

## Source files

Extends [`uiCollection`]({{ page.baseurl }}/ui_comp_guide/concepts/ui_comp_uicollection_concept.html):

- [`Magento_Ui_module_dir/view/base/web/js/modal/modal-component.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/modal/modal-component.js)
- [`Magento_Ui_module_dir/view/base/web/templates/modal/modal-component.html`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/modal/modal-component.html)
- [`Magento_Ui_module_dir/view/base/web/js/modal/modal-component.js`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/js/modal/modal-component.js)
- [`Magento_Ui_module_dir/view/base/web/templates/modal/modal-component.html`]({{ site.mage2bloburl }}/{{ page.guide_version }}/app/code/Magento/Ui/view/base/web/templates/modal/modal-component.html)

### Methods and events

- `actionCancel()` - returns all modal's child components to the state they had on modal open and closes the modal window.
- `actionDone()` - validates the changes in the modal's child components and, if valid, closes the modal.
- `closeModal()` - closes the modal window.
- `openModal()` - opens the modal window.
- `setPrevValues(elem)` - returns all `elem`'s child components to the state they had on modal open.
- `setTitle()` - sets modal title.
- `setSubTitle()` - sets modal sub title.
- `toggleModal()` - toggles the modal window state (open/close).
- `actionCancel()` - returns all modal's child components to the state they had on modal open and closes the modal window.
- `actionDone()` - validates the changes in the modal's child components and, if valid, closes the modal.
- `closeModal()` - closes the modal window.
- `openModal()` - opens the modal window.
- `setPrevValues(elem)` - returns all `elem`'s child components to the state they had on modal open.
- `setTitle()` - sets modal title.
- `setSubTitle()` - sets modal sub title.
- `toggleModal()` - toggles the modal window state (open/close).

0 comments on commit 4d6ec1b

Please sign in to comment.