2018-10-25 02:07:10 +00:00
|
|
|
const html = require('choo/html');
|
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
|
|
|
return html`
|
2018-11-05 22:19:26 +00:00
|
|
|
<div class="absolute pin flex items-center justify-center overflow-hidden my-8 z-40 bg-cloud" onclick=${close}>
|
2018-11-02 09:27:59 +00:00
|
|
|
<div class="h-full max-h-screen absolute pin-t flex items-center">
|
2018-11-02 18:28:56 +00:00
|
|
|
<div class="shadow-cloud bg-white" onclick=${e => e.stopPropagation()}>
|
2018-11-02 09:27:59 +00:00
|
|
|
${state.modal(state, emit, close)}
|
|
|
|
</div>
|
2018-10-25 02:07:10 +00:00
|
|
|
</div>
|
|
|
|
</div>`;
|
|
|
|
|
|
|
|
function close(event) {
|
2018-10-29 16:52:24 +00:00
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
}
|
2018-10-25 02:07:10 +00:00
|
|
|
state.modal = null;
|
|
|
|
emit('render');
|
|
|
|
}
|
|
|
|
};
|