mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
add qr context menus
This commit is contained in:
27
public/scripts/extensions/quick-reply/src/MenuHeader.js
Normal file
27
public/scripts/extensions/quick-reply/src/MenuHeader.js
Normal file
@ -0,0 +1,27 @@
|
||||
import { SubMenu } from "./SubMenu.js";
|
||||
|
||||
export class MenuHeader {
|
||||
/**@type {String}*/ label;
|
||||
|
||||
/**@type {HTMLElement}*/ root;
|
||||
|
||||
|
||||
|
||||
|
||||
constructor(/**@type {String}*/label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user