2017-03-18 12:05:11 +01:00
|
|
|
import * as riot from 'riot';
|
2017-02-18 09:43:31 +01:00
|
|
|
|
2017-03-18 12:05:11 +01:00
|
|
|
export default (title, placeholder, defaultValue, onOk, onCancel) => {
|
2017-02-18 09:43:31 +01:00
|
|
|
const dialog = document.body.appendChild(document.createElement('mk-input-dialog'));
|
2017-11-13 10:05:35 +01:00
|
|
|
return (riot as any).mount(dialog, {
|
2017-02-18 09:43:31 +01:00
|
|
|
title: title,
|
|
|
|
placeholder: placeholder,
|
|
|
|
'default': defaultValue,
|
|
|
|
onOk: onOk,
|
|
|
|
onCancel: onCancel
|
|
|
|
});
|
|
|
|
};
|