Refactor components

Implement context mechanism to pass default attributes to descendant
components.
This commit is contained in:
Zaid Abdulla committed 2019-02-12 23:11:27 -08:00
1 parent d46d133878
commit ee8c43747e
35 files changed
+1903 -1831

No files matched your search

+9 -9
View File
@@ -1,12 +1,12 @@
"use strict";
import m from "mithril";
import { m } from "./components";
const component = {
view: function(vnode) {
document.title = "Error! - GenieACS";
return m("p.error", vnode.attrs.error);
}
};
export { component };
export function component() {
return {
view: function(vnode) {
document.title = "Error! - GenieACS";
return m("p.error", vnode.attrs.error);
}
};
}