stubbed in modal dialog
This commit is contained in:
parent
20528eb0d1
commit
cdc15596df
11 changed files with 100 additions and 24 deletions
15
app/templates/modal/index.js
Normal file
15
app/templates/modal/index.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
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()}>
|
||||
${state.modal(state, close)}
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
function close(event) {
|
||||
state.modal = null;
|
||||
emit('render');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue