45e8331e26
Closes #12, #227 and #58
16 lines
420 B
JavaScript
16 lines
420 B
JavaScript
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.mount(dialog, {
|
|
controller: controller,
|
|
title: title,
|
|
text: text,
|
|
buttons: buttons,
|
|
canThrough: canThrough,
|
|
onThrough: onThrough
|
|
});
|
|
controller.trigger('open');
|
|
return controller;
|
|
};
|