Move collection manifest parser and mapper to collection-files-service directory
[arvados-workbench2.git] / src / components / side-panel / side-panel.tsx
index 4240b1bfd29708ec915555daffe3667587201006..ec648e11b2e6d84922e57a54a6e57f973f381e1c 100644 (file)
@@ -10,6 +10,7 @@ import { List, ListItem, ListItemIcon, Collapse } from "@material-ui/core";
 import { SidePanelRightArrowIcon, IconType } from '../icon/icon';
 import * as classnames from "classnames";
 import { ListItemTextIcon } from '../list-item-text-icon/list-item-text-icon';
+import { Dispatch } from "redux";
 
 type CssRules = 'active' | 'row' | 'root' | 'list' | 'iconClose' | 'iconOpen' | 'toggableIconContainer' | 'toggableIcon';
 
@@ -33,7 +34,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     toggableIconContainer: {
         color: theme.palette.grey["700"],
         height: '14px',
-        position: 'absolute'
+        width: '14px'
     },
     toggableIcon: {
         fontSize: '14px'
@@ -58,6 +59,7 @@ export interface SidePanelItem {
     open?: boolean;
     margin?: boolean;
     openAble?: boolean;
+    activeAction?: (dispatch: Dispatch) => void;
 }
 
 interface SidePanelDataProps {
@@ -107,11 +109,11 @@ export const SidePanel = withStyles(styles)(
         }
 
         getToggableIconClassNames = (isOpen?: boolean, isActive ?: boolean) => {
-            const { classes } = this.props;
-            return classnames(classes.toggableIcon, {
-                [classes.iconOpen]: isOpen,
-                [classes.iconClose]: !isOpen,
-                [classes.active]: isActive
+            const { iconOpen, iconClose, active, toggableIcon } = this.props.classes;
+            return classnames(toggableIcon, {
+                [iconOpen]: isOpen,
+                [iconClose]: !isOpen,
+                [active]: isActive
             });
         }