2018-10-25 04:07:10 +02:00
|
|
|
const html = require('choo/html');
|
|
|
|
|
|
|
|
module.exports = function(state, emit) {
|
|
|
|
return html`
|
2019-01-11 01:22:40 +01:00
|
|
|
<send-modal
|
2019-06-14 20:30:43 +02:00
|
|
|
class="absolute inset-0 flex items-center justify-center overflow-hidden z-40 bg-white md:rounded-xl md:my-8"
|
2018-11-16 21:39:36 +01:00
|
|
|
onclick="${close}"
|
|
|
|
>
|
2019-03-01 21:56:10 +01:00
|
|
|
<div
|
2019-06-14 20:30:43 +02:00
|
|
|
class="h-full w-full max-h-screen absolute top-0 flex items-center justify-center"
|
2019-03-01 21:56:10 +01:00
|
|
|
>
|
|
|
|
<div class="w-full" onclick="${e => e.stopPropagation()}">
|
2018-11-16 21:39:36 +01:00
|
|
|
${state.modal(state, emit, close)}
|
|
|
|
</div>
|
2018-11-02 10:27:59 +01:00
|
|
|
</div>
|
2019-01-11 01:22:40 +01:00
|
|
|
</send-modal>
|
2018-11-16 21:39:36 +01:00
|
|
|
`;
|
2018-10-25 04:07:10 +02:00
|
|
|
|
|
|
|
function close(event) {
|
2018-10-29 17:52:24 +01:00
|
|
|
if (event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
|
|
|
}
|
2019-04-26 22:30:33 +02:00
|
|
|
emit('closeModal');
|
2018-10-25 04:07:10 +02:00
|
|
|
}
|
|
|
|
};
|