mirror of
https://github.com/zadam/trilium.git
synced 2025-12-29 10:44:25 +01:00
30 lines
484 B
JavaScript
30 lines
484 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
|
|
*/
|
|
doRender() {}
|
|
|
|
toggle(show) {
|
|
if (!this.$widget) {
|
|
console.log(this.componentId);
|
|
}
|
|
|
|
this.$widget.toggle(show);
|
|
}
|
|
|
|
cleanup() {}
|
|
}
|
|
|
|
export default BasicWidget; |