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

Lexical: Refined editor UI

- Cleaned up dropdown lists to look integrated
- Added icons for color picker clear and menu list items
This commit is contained in:
Dan Brown
2024-09-09 14:06:41 +01:00
parent fd07aa0f05
commit fb49371c6b
9 changed files with 87 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ import {handleDropdown} from "../helpers/dropdowns";
import {EditorContainerUiElement, EditorUiElement} from "../core";
import {EditorBasicButtonDefinition, EditorButton} from "../buttons";
import {el} from "../../../utils/dom";
import {EditorMenuButton} from "./menu-button";
export type EditorDropdownButtonOptions = {
showOnHover?: boolean;
@@ -29,7 +30,8 @@ export class EditorDropdownButton extends EditorContainerUiElement {
if (options.button instanceof EditorButton) {
this.button = options.button;
} else {
this.button = new EditorButton({
const type = options.button.format === 'long' ? EditorMenuButton : EditorButton;
this.button = new type({
...options.button,
action() {
return false;