1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Lexical: Added more icons, made reflective text/bg color buttons

This commit is contained in:
Dan Brown
2024-06-23 15:50:41 +01:00
parent a07092b7e6
commit 5546b8ff43
10 changed files with 79 additions and 19 deletions

View File

@@ -8,19 +8,23 @@ export class EditorDropdownButton extends EditorContainerUiElement {
protected childItems: EditorUiElement[];
protected open: boolean = false;
constructor(buttonDefinition: EditorBasicButtonDefinition, children: EditorUiElement[]) {
constructor(button: EditorBasicButtonDefinition|EditorButton, children: EditorUiElement[]) {
super(children);
this.childItems = children
this.button = new EditorButton({
...buttonDefinition,
action() {
return false;
},
isActive: () => {
return this.open;
}
});
if (button instanceof EditorButton) {
this.button = button;
} else {
this.button = new EditorButton({
...button,
action() {
return false;
},
isActive: () => {
return this.open;
}
});
}
this.children.push(this.button);
}