summaryrefslogtreecommitdiff
path: root/src/web/app/desktop/scripts/input-dialog.js
blob: ab9c57401ffba48ad308ccbf09f9bcac94ffc0f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
const riot = require('riot');

module.exports = (title, placeholder, defaultValue, onOk, onCancel) => {
	const dialog = document.body.appendChild(document.createElement('mk-input-dialog'));
	return riot.mount(dialog, {
		title: title,
		placeholder: placeholder,
		'default': defaultValue,
		onOk: onOk,
		onCancel: onCancel
	});
};