fox-send/app/ui/modal.js

26 lines
623 B
JavaScript
Raw Permalink Normal View History

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