parent
679a00b77d
commit
c249c7495d
11 changed files with 153 additions and 213 deletions
@ -1,40 +0,0 @@ |
|||||||
import React from 'react'; |
|
||||||
import { WindowType } from '../windows/Windows'; |
|
||||||
import { Menu, MenuItem } from '@material-ui/core'; |
|
||||||
|
|
||||||
export interface NewTabProps { |
|
||||||
windowType: WindowType, |
|
||||||
} |
|
||||||
|
|
||||||
export interface IProps { |
|
||||||
anchorEl: null | HTMLElement, |
|
||||||
onClose: () => void, |
|
||||||
onCreateTab: (q: NewTabProps) => void, |
|
||||||
} |
|
||||||
|
|
||||||
export default function AddTabMenu(props: IProps) { |
|
||||||
return <Menu |
|
||||||
anchorEl={props.anchorEl} |
|
||||||
keepMounted |
|
||||||
open={Boolean(props.anchorEl)} |
|
||||||
onClose={props.onClose} |
|
||||||
> |
|
||||||
<MenuItem disabled={true}>New Tab</MenuItem> |
|
||||||
<MenuItem |
|
||||||
onClick={() => { |
|
||||||
props.onClose(); |
|
||||||
props.onCreateTab({ |
|
||||||
windowType: WindowType.Query, |
|
||||||
}) |
|
||||||
}} |
|
||||||
>{WindowType.Query}</MenuItem> |
|
||||||
<MenuItem |
|
||||||
onClick={() => { |
|
||||||
props.onClose(); |
|
||||||
props.onCreateTab({ |
|
||||||
windowType: WindowType.ManageTags, |
|
||||||
}) |
|
||||||
}} |
|
||||||
>Manage Tags</MenuItem> |
|
||||||
</Menu> |
|
||||||
} |
|
Loading…
Reference in new issue