vehicle-monitor/WebApp/src/components/component.ts
Youen Toupin 48fb012e54 added widget layout styling
added basic system to render linear gauges (wip)
2022-04-12 23:06:58 +02:00

24 lines
439 B
TypeScript

import m from 'mithril';
export abstract class Component {
abstract view(vnode: m.Vnode): m.Children;
constructor(vnode?: m.Vnode) {
}
oninit(vnode: m.Vnode) {}
oncreate(vnode: m.Vnode) {}
onbeforeupdate(newVnode: m.Vnode, oldVnode: m.Vnode) {
return true;
}
onupdate(vnode: m.Vnode) {}
onbeforeremove(vnode: m.Vnode): Promise<void> | void {}
onremove(vnode: m.Vnode) {}
}