Skip to content

Vizel API / core/src / buildVizelToolbarDropdownSpec

Function: buildVizelToolbarDropdownSpec() ​

ts
function buildVizelToolbarDropdownSpec(
   dropdown, 
   editor, 
   isOpen, 
   focusedIndex
): VizelToolbarDropdownSpec;

Defined in: packages/core/src/builders/toolbar-dropdown.ts:70

Build a VizelToolbarDropdownSpec for the toolbar dropdown.

Parameters ​

ParameterTypeDescription
dropdownVizelToolbarDropdownActionThe dropdown action definition (id, options, getActiveOption).
editorEditorCurrent editor instance — used to pre-evaluate isActive / isEnabled for each option and to resolve the active-option icon / label for the trigger.
isOpenbooleanWhether the popover is currently open.
focusedIndexnumberIndex of the keyboard-focused option.

Returns ​

VizelToolbarDropdownSpec

Released under the MIT License.