2018-09-07 19:53:40 +02:00
|
|
|
const html = require('choo/html');
|
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
|
|
|
return html`
|
|
|
|
<div class="modal" onclick=${close}>
|
|
|
|
<div class="modal__box" onclick=${e => e.stopPropagation()}>
|
2018-09-28 00:46:46 +02:00
|
|
|
${state.modal(state, emit, close)}
|
2018-09-07 19:53:40 +02:00
|
|
|
</div>
|
|
|
|
</div>`;
|
|
|
|
|
|
|
|
function close(event) {
|
|
|
|
state.modal = null;
|
|
|
|
emit('render');
|
|
|
|
}
|
|
|
|
};
|