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