mirror of
https://github.com/misskey-dev/misskey
synced 2024-05-18 09:20:04 +02:00
17 lines
431 B
TypeScript
17 lines
431 B
TypeScript
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;
|
|
};
|