fox-send/app/ui/modal.js

17 lines
430 B
JavaScript
Raw Normal View History

2018-10-25 02:07:10 +00:00
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}>
2018-10-25 20:28:06 +00:00
<div class="rounded max-w-md bg-white m-1" onclick=${e =>
e.stopPropagation()}>
2018-10-25 02:07:10 +00:00
${state.modal(state, emit, close)}
</div>
</div>`;
function close(event) {
state.modal = null;
emit('render');
}
};