Implement task queue and notifications
This commit is contained in:
1 parent
9b827c5f5e
commit
b24c3626ac
20 files changed
+1000
-88
No files matched your search
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
import m from "mithril";
|
||||
import * as components from "../components";
|
||||
|
||||
const component = {
|
||||
view: vnode => {
|
||||
let children = Object.values(vnode.attrs.components).map(c => {
|
||||
const attrs = Object.assign({}, vnode.attrs, c);
|
||||
return m(components.get(attrs.type), attrs);
|
||||
});
|
||||
if (vnode.attrs.element) return m(vnode.attrs.element, children);
|
||||
else return children;
|
||||
}
|
||||
};
|
||||
|
||||
export default component;
|
||||
Reference in new issue
Block a user