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

Lexical: Worked on toolbar styling, got format submenu working

This commit is contained in:
Dan Brown
2024-07-04 16:16:16 +01:00
parent 04c7e680fd
commit 2c96af9aea
6 changed files with 133 additions and 52 deletions

View File

@@ -17,13 +17,14 @@ export class EditorOverflowContainer extends EditorContainerUiElement {
this.overflowButton = new EditorDropdownButton({
label: 'More',
icon: moreHorizontal,
}, []);
}, false, []);
this.addChildren(this.overflowButton);
}
protected buildDOM(): HTMLElement {
const visibleChildren = this.content.slice(0, this.size);
const invisibleChildren = this.content.slice(this.size);
const slicePosition = this.content.length > this.size ? this.size - 1 : this.size;
const visibleChildren = this.content.slice(0, slicePosition);
const invisibleChildren = this.content.slice(slicePosition);
const visibleElements = visibleChildren.map(child => child.getDOMElement());
if (invisibleChildren.length > 0) {