mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
26 lines
407 B
JavaScript
26 lines
407 B
JavaScript
import Component from "./component.js";
|
|
|
|
class BasicWidget extends Component {
|
|
renderTo($parent) {
|
|
this.$parent = $parent;
|
|
|
|
$parent.append(this.render());
|
|
}
|
|
|
|
render() {
|
|
return this.doRender();
|
|
}
|
|
|
|
/**
|
|
* for overriding
|
|
*/
|
|
async doRender() {}
|
|
|
|
toggle(show) {
|
|
this.$widget.toggle(show);
|
|
}
|
|
|
|
cleanup() {}
|
|
}
|
|
|
|
export default BasicWidget; |