button tweaks

This commit is contained in:
zadam
2021-05-28 22:47:59 +02:00
parent 7fcf90437a
commit a3d44fbdef
8 changed files with 110 additions and 133 deletions

View File

@@ -0,0 +1,16 @@
import ButtonWidget from "./button_widget.js";
export default class ShowNoteSourceButton extends ButtonWidget {
isEnabled() {
return super.isEnabled() && this.note && ['text', 'relation-map'].includes(this.note.type);
}
constructor() {
super();
this.icon('bx bx-code')
.title("Show Note Source")
.command("showNoteSource")
.titlePlacement("bottom");
}
}