1 import {EditorContainerUiElement, EditorUiElement} from "../core";
2 import {el} from "../../../utils/dom";
3 import {EditorButton} from "../buttons";
4 import {EditorDropdownButton} from "./dropdown-button";
5 import caretDownIcon from "@icons/caret-down-large.svg";
7 export class EditorButtonWithMenu extends EditorContainerUiElement {
8 protected button: EditorButton;
9 protected dropdownButton: EditorDropdownButton;
11 constructor(button: EditorButton, menuItems: EditorUiElement[]) {
15 this.dropdownButton = new EditorDropdownButton({
16 button: {label: 'Menu', icon: caretDownIcon},
18 direction: 'vertical',
21 this.addChildren(this.dropdownButton);
24 buildDOM(): HTMLElement {
26 class: 'editor-button-with-menu-container',
28 this.button.getDOMElement(),
29 this.dropdownButton.getDOMElement()