Code Study: GitHub Desktop / ui / app-menu / app-menu-bar-button.tsx

<ToolbarDropdown
  ref={this.onDropDownRef}
  key={item.id}
  dropdownState={dropDownState}
  onDropdownStateChanged={this.onDropdownStateChanged}
  dropdownContentRenderer={this.dropDownContentRenderer}
  showDisclosureArrow={false}
  onMouseEnter={this.onMouseEnter}
  onKeyDown={this.onKeyDown}
  tabIndex={-1}
  role="menuitem"
>
  <MenuListItem
    item={item}
    highlightAccessKey={this.props.highlightMenuAccessKey}
    renderAcceleratorText={false}
    renderSubMenuArrow={false}
  />
</ToolbarDropdown>

See the Relationship between AppMenuBar, AppMenuBarButton, and AppMenu React components

tags: GitHub Desktop - Electron - React