add modal dialog

This commit is contained in:
Stewart Allen 2022-01-06 15:10:03 -05:00
commit 2666069a27
4 changed files with 113 additions and 7 deletions

View file

@ -43,6 +43,10 @@ function build(data, context) {
return html;
}
let { type, attr, innr } = data;
// auto text content
if (typeof attr === 'string') {
attr = { _: attr };
}
let elid;
let html = [];
let text
@ -119,7 +123,7 @@ let h = self.h = moto.webui = {
};
// add common element types
["a", "div", "span", "label", "input", "button"].forEach(type => {
["a", "i", "div", "span", "label", "input", "button"].forEach(type => {
h[type] = (attr, innr) => {
return h.el(type, attr, innr);
}