1
0
mirror of https://gitlab.com/timvisee/send.git synced 2024-11-10 13:13:00 +01:00
send/app/ui/modal.js
2018-11-01 10:43:43 -07:00

16 lines
420 B
JavaScript

const html = require('choo/html');
module.exports = function(state, emit) {
return html`
<div class="fixed pin flex items-center justify-center overflow-hidden z-40 bg-shades" onclick=${close}>
<div class="rounded max-w-md bg-white" onclick=${e => e.stopPropagation()}>
${state.modal(state, emit, close)}
</div>
</div>`;
function close(event) {
state.modal = null;
emit('render');
}
};