diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:43:31 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-18 17:43:31 +0900 |
| commit | a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b (patch) | |
| tree | eb5fa7d8169958127a31c38354d6cb975259cb0a /src/web/app/desktop/scripts/input-dialog.js | |
| parent | :v: (diff) | |
| download | misskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.gz misskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.tar.bz2 misskey-a5ece57e3dcbc184ce8bafe88db52d4e6b845f5b.zip | |
:v:
Diffstat (limited to 'src/web/app/desktop/scripts/input-dialog.js')
| -rw-r--r-- | src/web/app/desktop/scripts/input-dialog.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/web/app/desktop/scripts/input-dialog.js b/src/web/app/desktop/scripts/input-dialog.js new file mode 100644 index 0000000000..ab9c57401f --- /dev/null +++ b/src/web/app/desktop/scripts/input-dialog.js @@ -0,0 +1,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 + }); +}; |