mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-18 07:57:38 -07:00
17 lines
422 B
JavaScript
17 lines
422 B
JavaScript
|
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;
|
||
|
};
|