Add --local option to command of a new process
[arvados-workbench2.git] / src / components / list-item-text-icon / list-item-text-icon.tsx
index e18e9cccf5ccc3157a3ed4df6d9ed9ec114a2e55..3afc2cf8773293a18566c468253aaade648c3a4a 100644 (file)
@@ -9,7 +9,7 @@ import { ListItemIcon, ListItemText, Typography } from '@material-ui/core';
 import { IconType } from '../icon/icon';
 import * as classnames from "classnames";
 
-type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active' | 'fixFontSize';
+type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active';
 
 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     root: {
@@ -24,9 +24,6 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
     hasMargin: {
         marginLeft: `${theme.spacing.unit}px`,
-    },
-    fixFontSize: {
-        fontSize: '1.25rem'
     }
 });
 
@@ -35,7 +32,7 @@ export interface ListItemTextIconDataProps {
     name: string;
     isActive?: boolean;
     hasMargin?: boolean;
-    fixFontSize?: boolean;
+    iconSize?: number;
 }
 
 type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
@@ -43,19 +40,18 @@ type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
 export const ListItemTextIcon = withStyles(styles)(
     class extends React.Component<ListItemTextIconProps, {}> {
         render() {
-            const { classes, isActive, hasMargin, name, icon: Icon, fixFontSize } = this.props;
+            const { classes, isActive, hasMargin, name, icon: Icon, iconSize } = this.props;
             return (
                 <Typography component='span' className={classes.root}>
                     <ListItemIcon className={classnames({
                             [classes.hasMargin]: hasMargin,
                             [classes.active]: isActive
                         })}>
-                        <Icon className={classnames({
-                            [classes.fixFontSize]: fixFontSize
-                        })}/>
+
+                        <Icon style={{ fontSize: `${iconSize}rem` }} />
                     </ListItemIcon>
                     <ListItemText primary={
-                        <Typography variant='body1' className={classnames(classes.listItemText, {
+                        <Typography  className={classnames(classes.listItemText, {
                                 [classes.active]: isActive
                             })}>
                             {name}