blob: 816ba4b5f5a7f2f2ce19086e8625e3f7ec47306c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import * as riot from 'riot';
export default (title, text, buttons, canThrough?, onThrough?) => {
const dialog = document.body.appendChild(document.createElement('mk-dialog'));
const controller = riot.observable();
(riot as any).mount(dialog, {
controller: controller,
title: title,
text: text,
buttons: buttons,
canThrough: canThrough,
onThrough: onThrough
});
controller.trigger('open');
return controller;
};
|