habitica-sync/view.ts
2021-10-03 18:10:16 +05:30

27 lines
No EOL
536 B
TypeScript

import { ItemView,WorkspaceLeaf } from "obsidian";
export const VIEW_TYPE_EXAMPLE = "example-view"
export class ExampleView extends ItemView {
constructor(leaf: WorkspaceLeaf) {
super(leaf)
}
getViewType() {
return VIEW_TYPE_EXAMPLE
}
getDisplayText() {
return "Example View"
}
async onOpen() {
const container = this.containerEl.children[1];
container.empty()
container.createEl("h4", {text: "Example View"});
}
async onClose(){
}
}