https://github.com/datashaman/rg-modal
Modal popup
https://github.com/datashaman/rg-modal
Last synced: about 1 year ago
JSON representation
Modal popup
- Host: GitHub
- URL: https://github.com/datashaman/rg-modal
- Owner: datashaman
- License: mit
- Created: 2015-10-06T20:47:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-20T08:37:21.000Z (almost 11 years ago)
- Last Synced: 2025-02-06T05:43:46.243Z (over 1 year ago)
- Language: JavaScript
- Size: 504 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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