X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/10ce16c28de952f6533ca3cc9df909269e3d2a53..ba27bdf218da8894df4ffa6174c67c1fb3e70c81:/src/views-components/project-tree/project-tree.tsx?ds=sidebyside

diff --git a/src/views-components/project-tree/project-tree.tsx b/src/views-components/project-tree/project-tree.tsx
index c9d4c3e3..fe808af5 100644
--- a/src/views-components/project-tree/project-tree.tsx
+++ b/src/views-components/project-tree/project-tree.tsx
@@ -4,12 +4,12 @@
 
 import * as React from 'react';
 import { ReactElement } from 'react';
-import { StyleRulesCallback, Theme, WithStyles, withStyles } from '@material-ui/core/styles';
-import { Tree, TreeItem, TreeItemStatus } from '../../components/tree/tree';
-import { ProjectResource } from '../../models/project';
-import { ProjectIcon } from '../../components/icon/icon';
-import { ArvadosTheme } from '../../common/custom-theme';
-import { ListItemTextIcon } from '../../components/list-item-text-icon/list-item-text-icon';
+import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
+import { Tree, TreeItem, TreeItemStatus } from '~/components/tree/tree';
+import { ProjectResource } from '~/models/project';
+import { ProjectIcon } from '~/components/icon/icon';
+import { ArvadosTheme } from '~/common/custom-theme';
+import { ListItemTextIcon } from '~/components/list-item-text-icon/list-item-text-icon';
 
 type CssRules = 'root';
 
@@ -19,15 +19,15 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     }
 });
 
-export interface ProjectTreeProps {
+export interface ProjectTreeProps<T> {
     projects: Array<TreeItem<ProjectResource>>;
-    toggleOpen: (id: string, status: TreeItemStatus) => void;
-    toggleActive: (id: string, status: TreeItemStatus) => void;
+    toggleOpen: (event: React.MouseEvent<HTMLElement>, item: TreeItem<T>) => void;
+    toggleActive: (event: React.MouseEvent<HTMLElement>, item: TreeItem<T>) => void;
     onContextMenu: (event: React.MouseEvent<HTMLElement>, item: TreeItem<ProjectResource>) => void;
 }
 
 export const ProjectTree = withStyles(styles)(
-    class ProjectTreeGeneric<T> extends React.Component<ProjectTreeProps & WithStyles<CssRules>> {
+    class ProjectTreeGeneric<T> extends React.Component<ProjectTreeProps<T> & WithStyles<CssRules>> {
         render(): ReactElement<any> {
             const { classes, projects, toggleOpen, toggleActive, onContextMenu } = this.props;
             return (
@@ -42,8 +42,8 @@ export const ProjectTree = withStyles(styles)(
                                     icon={ProjectIcon}
                                     name={project.data.name}
                                     isActive={project.active}
-                                    hasMargin={true}/>
-                        }/>
+                                    hasMargin={true} />
+                        } />
                 </div>
             );
         }
