misskey/src/client/app/mobile/api/input.ts
2018-03-29 20:32:18 +09:00

9 lines
148 B
TypeScript

export default function(opts) {
return new Promise<string>((res, rej) => {
const x = window.prompt(opts.title);
if (x) {
res(x);
}
});
}