X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/33608c44bf33ab330ad1267ab8d56c08634673b5..0ecbcbd790d784e72f2e7c90fc6a417b79acd022:/src/components/list-item-text-icon/list-item-text-icon.tsx

diff --git a/src/components/list-item-text-icon/list-item-text-icon.tsx b/src/components/list-item-text-icon/list-item-text-icon.tsx
index e7f63eaf..3bea1e1c 100644
--- a/src/components/list-item-text-icon/list-item-text-icon.tsx
+++ b/src/components/list-item-text-icon/list-item-text-icon.tsx
@@ -7,7 +7,7 @@ import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/st
 import { ArvadosTheme } from '~/common/custom-theme';
 import { ListItemIcon, ListItemText, Typography } from '@material-ui/core';
 import { IconType } from '../icon/icon';
-import * as classnames from "classnames";
+import classnames from "classnames";
 
 type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active';
 
@@ -24,7 +24,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
     },
     hasMargin: {
         marginLeft: `${theme.spacing.unit}px`,
-    },
+    }
 });
 
 export interface ListItemTextIconDataProps {
@@ -32,6 +32,8 @@ export interface ListItemTextIconDataProps {
     name: string;
     isActive?: boolean;
     hasMargin?: boolean;
+    iconSize?: number;
+    nameDecorator?: JSX.Element;
 }
 
 type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
@@ -39,17 +41,19 @@ type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
 export const ListItemTextIcon = withStyles(styles)(
     class extends React.Component<ListItemTextIconProps, {}> {
         render() {
-            const { classes, isActive, hasMargin, name, icon: Icon } = this.props;
+            const { classes, isActive, hasMargin, name, icon: Icon, iconSize, nameDecorator } = this.props;
             return (
                 <Typography component='span' className={classes.root}>
                     <ListItemIcon className={classnames({
                             [classes.hasMargin]: hasMargin,
                             [classes.active]: isActive
                         })}>
-                        <Icon />
+
+                        <Icon style={{ fontSize: `${iconSize}rem` }} />
                     </ListItemIcon>
+                    {nameDecorator || null}
                     <ListItemText primary={
-                        <Typography variant='body1' className={classnames(classes.listItemText, {
+                        <Typography className={classnames(classes.listItemText, {
                                 [classes.active]: isActive
                             })}>
                             {name}
