summaryrefslogtreecommitdiff
path: root/src/web/app/desktop/scripts/dialog.js
blob: c502d3fcb8a92b7dbadff6c6cd4989b196f3d357 (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.mount(dialog, {
		controller: controller,
		title: title,
		text: text,
		buttons: buttons,
		canThrough: canThrough,
		onThrough: onThrough
	});
	controller.trigger('open');
	return controller;
};