add context menu

This commit is contained in:
LenAnderson
2023-12-20 21:44:55 +00:00
parent bab0c4b0b9
commit 65e16affb7
9 changed files with 451 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
import { MenuItem } from './MenuItem.js';
export class MenuHeader extends MenuItem {
constructor(/**@type {String}*/label) {
super(label, null, null);
}
render() {
if (!this.root) {
const item = document.createElement('li'); {
this.root = item;
item.classList.add('list-group-item');
item.classList.add('ctx-header');
item.append(this.label);
}
}
return this.root;
}
}