blob: 6fe7b6e8d74289b1fc8d70b70547b168d7778ec1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
const riot = require('riot');
module.exports = (title, text, buttons, canThrough, onThrough) => {
const dialog = document.body.appendChild(document.createElement('mk-dialog'));
const controller = riot.observable();
riot.mount(dialog, {
controller: controller,
title: title,
text: text,
buttons: buttons,
canThrough: canThrough,
onThrough: onThrough
});
controller.trigger('open');
return controller;
};
|