X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/fef17c665b0d6acb4be97c9dcf4a6cb7a92ee6ef..ae691a976c8e505afba7cec6f8f316d1c5b175a7:/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 f140d860..8f9d4744 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 @@ -9,40 +9,8 @@ import { ListItemIcon, ListItemText, Typography } from '@material-ui/core'; import { IconType } from '../icon/icon'; import * as classnames from "classnames"; -export interface ListItemTextIconDataProps { - icon: IconType; - name: string; - isActive?: boolean; - hasMargin?: boolean; -} - -type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles; - -class ListItemTextIcon extends React.Component { - render() { - const { classes, isActive, hasMargin, name, icon: Icon } = this.props; - return ( - - - - - - {name} - - } /> - - ); - } -} - type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active'; - + const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ root: { display: 'flex', @@ -59,4 +27,36 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ }, }); -export default withStyles(styles)(ListItemTextIcon); \ No newline at end of file +export interface ListItemTextIconDataProps { + icon: IconType; + name: string; + isActive?: boolean; + hasMargin?: boolean; +} + +type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles; + +export const ListItemTextIcon = withStyles(styles)( + class extends React.Component { + render() { + const { classes, isActive, hasMargin, name, icon: Icon } = this.props; + return ( + + + + + + {name} + + } /> + + ); + } + } +);