},
hasMargin: {
marginLeft: `${theme.spacing.unit}px`,
- },
+ }
});
export interface ListItemTextIconDataProps {
name: string;
isActive?: boolean;
hasMargin?: boolean;
+ iconSize?: number;
}
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 } = 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>
<ListItemText primary={
- <Typography variant='body1' className={classnames(classes.listItemText, {
+ <Typography className={classnames(classes.listItemText, {
[classes.active]: isActive
})}>
{name}