iceshrimp-legacy/src/web/app/desktop/scripts/input-dialog.ts
2017-11-13 18:05:35 +09:00

13 lines
340 B
TypeScript

import * as riot from 'riot';
export default (title, placeholder, defaultValue, onOk, onCancel) => {
const dialog = document.body.appendChild(document.createElement('mk-input-dialog'));
return (riot as any).mount(dialog, {
title: title,
placeholder: placeholder,
'default': defaultValue,
onOk: onOk,
onCancel: onCancel
});
};