import { Button, Menu, MenuDivider, MenuItem, Popover, Position, } from '@blueprintjs/core'; import { observer } from 'mobx-react'; import * as React from 'react'; import { AppState } from '../state'; import { DEFAULT_EDITORS, EditorId } from '../../interfaces'; import { EditorPresence } from '../editor-mosaic'; import { getEditorTitle } from '../../utils/editor-utils'; interface EditorDropdownState { value: string; } interface EditorDropdownProps { appState: AppState; } /** * A dropdown allowing users to toggle the various editors * * @class EditorDropdown * @extends {React.Component} */ @observer export class EditorDropdown extends React.Component< EditorDropdownProps, EditorDropdownState > { constructor(props: EditorDropdownProps) { super(props); this.onItemClick = this.onItemClick.bind(this); this.addCustomEditor = this.addCustomEditor.bind(this); this.removeCustomEditor = this.removeCustomEditor.bind(this); } public render() { return ( <>