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