An open API service indexing awesome lists of open source software.

https://github.com/datashaman/rg-modal

Modal popup
https://github.com/datashaman/rg-modal

Last synced: about 1 year ago
JSON representation

Modal popup

Awesome Lists containing this project

README

          



## Use

Add this to your Riot app markup

```html

Modal body text

```

and add this to your JavaScript

```javascript
this.modal = {
heading: 'Modal heading',
visible: false,
ghost: true,
close: false,
buttons: [
{ action: function () {}, text: 'Save' },
{ action: function () {}, text: 'Cancel', style: 'color: cornflowerblue;' }
],
onclose: function (e) {}
};
```

To make the modal appear simply set the modal's `visible` property to true.

```javascript
this.modal.visible = true;
```

- `ghost` set this to true if you want a body-less modal
- `close` if set to false the small 'x' close button will be hidden