rudeshark.net/src/web/app/mobile/scripts/open-post-form.ts

16 lines
348 B
TypeScript
Raw Normal View History

2017-03-18 12:05:11 +01:00
import * as riot from 'riot';
export default opts => {
const app = document.getElementById('app');
app.style.display = 'none';
function recover() {
app.style.display = 'block';
}
const form = riot.mount(document.body.appendChild(document.createElement('mk-post-form')), opts)[0];
form
.on('cancel', recover)
.on('post', recover);
};