X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6577969579f623c9788113083342a5268ee7c8c8..d8b6d772739992431b81de993f8adc783b00feb1:/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 e18e9cccf5..226556aa09 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 @@ -2,14 +2,14 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles'; -import { ArvadosTheme } from '~/common/custom-theme'; +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' | 'fixFontSize'; +type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { @@ -24,9 +24,6 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, hasMargin: { marginLeft: `${theme.spacing.unit}px`, - }, - fixFontSize: { - fontSize: '1.25rem' } }); @@ -35,7 +32,8 @@ export interface ListItemTextIconDataProps { name: string; isActive?: boolean; hasMargin?: boolean; - fixFontSize?: boolean; + iconSize?: number; + nameDecorator?: JSX.Element; } type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles; @@ -43,19 +41,19 @@ type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles; export const ListItemTextIcon = withStyles(styles)( class extends React.Component { render() { - const { classes, isActive, hasMargin, name, icon: Icon, fixFontSize } = this.props; + const { classes, isActive, hasMargin, name, icon: Icon, iconSize, nameDecorator } = this.props; return ( - + + + {nameDecorator || null} {name}