Mock collection files removal dialogs
[arvados-workbench2.git] / src / views / project-panel / project-panel.tsx
index 17b0fd723db9f07f2c5c05d7e905aa6b6823bb71..de040effb81dcc975445c6bb74bfb2a79e7013d4 100644 (file)
@@ -38,7 +38,7 @@ const renderName = (item: ProjectPanelItem) =>
             {renderIcon(item)}
         </Grid>
         <Grid item>
-            <Typography color="primary">
+            <Typography color="default">
                 {item.name}
             </Typography>
         </Grid>
@@ -184,7 +184,8 @@ interface ProjectPanelDataProps {
 interface ProjectPanelActionProps {
     onItemClick: (item: ProjectPanelItem) => void;
     onContextMenu: (event: React.MouseEvent<HTMLElement>, item: ProjectPanelItem) => void;
-    onDialogOpen: (ownerUuid: string) => void;
+    onProjectCreationDialogOpen: (ownerUuid: string) => void;
+    onCollectionCreationDialogOpen: (ownerUuid: string) => void;
     onItemDoubleClick: (item: ProjectPanelItem) => void;
     onItemRouteChange: (itemId: string) => void;
 }
@@ -199,7 +200,7 @@ export const ProjectPanel = withStyles(styles)(
                 const { classes } = this.props;
                 return <div>
                     <div className={classes.toolbar}>
-                        <Button color="primary" variant="raised" className={classes.button}>
+                        <Button color="primary" onClick={this.handleNewCollectionClick} variant="raised" className={classes.button}>
                             Create a collection
                         </Button>
                         <Button color="primary" variant="raised" className={classes.button}>
@@ -219,7 +220,11 @@ export const ProjectPanel = withStyles(styles)(
             }
 
             handleNewProjectClick = () => {
-                this.props.onDialogOpen(this.props.currentItemId);
+                this.props.onProjectCreationDialogOpen(this.props.currentItemId);
+            }
+
+            handleNewCollectionClick = () => {
+                this.props.onCollectionCreationDialogOpen(this.props.currentItemId);
             }
             componentWillReceiveProps({ match, currentItemId, onItemRouteChange }: ProjectPanelProps) {
                 if (match.params.id !== currentItemId) {