projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up main app bar and breadcrumbs code
[arvados.git]
/
src
/
components
/
main-app-bar
/
dropdown-menu
/
dropdown-menu.tsx
diff --git
a/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
b/src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
index 34f9bf3f4659ee0c3ca0067a7f71db3a6029ab68..4f2b83af6591e6ab9d72d1e0d83914ff55bd4414 100644
(file)
--- a/
src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
+++ b/
src/components/main-app-bar/dropdown-menu/dropdown-menu.tsx
@@
-3,28
+3,25
@@
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import {
Button, Grid, StyleRulesCallback, WithStyles, Menu, MenuItem
, IconButton } from '@material-ui/core';
+import {
Menu
, IconButton } from '@material-ui/core';
import { PopoverOrigin } from '@material-ui/core/Popover';
import { PopoverOrigin } from '@material-ui/core/Popover';
-interface DropdownMenu
Data
Props {
- id: string
,
- icon: React.ComponentType
,
+interface DropdownMenuProps {
+ id: string
;
+ icon: React.ComponentType
;
}
}
-
-type DropdownMenuProps = DropdownMenuDataProps;
-
class DropdownMenu extends React.Component<DropdownMenuProps> {
state = {
anchorEl: undefined
class DropdownMenu extends React.Component<DropdownMenuProps> {
state = {
anchorEl: undefined
- }
+ }
;
transformOrigin: PopoverOrigin = {
vertical: "top",
horizontal: "center"
transformOrigin: PopoverOrigin = {
vertical: "top",
horizontal: "center"
- }
+ }
;
render() {
const { icon: Icon, id, children } = this.props;
render() {
const { icon: Icon, id, children } = this.props;
@@
-52,17
+49,17
@@
class DropdownMenu extends React.Component<DropdownMenuProps> {
{children}
</Menu>
</div>
{children}
</Menu>
</div>
- )
+ )
;
}
handleClose = () => {
}
handleClose = () => {
- this.setState({ anchorEl: undefined })
+ this.setState({ anchorEl: undefined })
;
}
handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {
}
handleOpen = (event: React.MouseEvent<HTMLButtonElement>) => {
- this.setState({ anchorEl: event.currentTarget })
+ this.setState({ anchorEl: event.currentTarget })
;
}
}
}
}
-export default DropdownMenu
+export default DropdownMenu
;