refs #master Merge branch 'origin/master' into 14007-ts-paths
[arvados-workbench2.git] / src / components / side-panel / side-panel.tsx
index 8622b68cc9e68049cbd60dfbf52d97c7266a8963..206cb6322b84a1d181d451f76d8886328837a969 100644 (file)
@@ -5,7 +5,7 @@
 import * as React from 'react';
 import { ReactElement } from 'react';
 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
-import { ArvadosTheme } from '../../common/custom-theme';
+import { ArvadosTheme } from '~/common/custom-theme';
 import { List, ListItem, ListItemIcon, Collapse } from "@material-ui/core";
 import { SidePanelRightArrowIcon, IconType } from '../icon/icon';
 import * as classnames from "classnames";
@@ -34,7 +34,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     toggableIconContainer: {
         color: theme.palette.grey["700"],
         height: '14px',
-        position: 'absolute'
+        width: '14px'
     },
     toggableIcon: {
         fontSize: '14px'
@@ -59,7 +59,7 @@ export interface SidePanelItem {
     open?: boolean;
     margin?: boolean;
     openAble?: boolean;
-    activeAction?: (dispatch: Dispatch) => void;
+    activeAction?: (dispatch: Dispatch, uuid?: string) => void;
 }
 
 interface SidePanelDataProps {
@@ -109,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
             });
         }