[ARVADOS-WORKBENCH2] updated: 1.1.4-326-g5219b97
Git user
git at public.curoverse.com
Wed Jul 18 08:55:48 EDT 2018
Summary of changes:
.../single-list-item/single-list-item.tsx | 26 ++++++----------------
1 file changed, 7 insertions(+), 19 deletions(-)
via 5219b97601d3aee849081f81536f8edd91d9ad53 (commit)
from 1d9efaa46b5e30f4b69fa8ebca99ea234a5d40c7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5219b97601d3aee849081f81536f8edd91d9ad53
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date: Wed Jul 18 14:55:43 2018 +0200
clean code for single-list-item
Feature #13797
Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>
diff --git a/src/components/single-list-item/single-list-item.tsx b/src/components/single-list-item/single-list-item.tsx
index 13338c3..17bf8b5 100644
--- a/src/components/single-list-item/single-list-item.tsx
+++ b/src/components/single-list-item/single-list-item.tsx
@@ -23,34 +23,22 @@ class SingleListItem extends React.Component<SingleListItemProps, {}> {
const { classes, isActive, hasMargin, name, icon: Icon } = this.props;
return (
<Typography component='span' className={classes.root}>
- <ListItemIcon className={this.getListItemIconClassNames(hasMargin, isActive)}>
+ <ListItemIcon className={classnames({
+ [classes.hasMargin]: hasMargin,
+ [classes.active]: isActive
+ })}>
<Icon />
</ListItemIcon>
<ListItemText primary={
- <Typography variant='body1' className={this.getListItemTextClassNames(isActive)}>
+ <Typography variant='body1' className={classnames(classes.listItemText, {
+ [classes.active]: isActive
+ })}>
{name}
</Typography>
} />
</Typography>
);
}
-
- getListItemIconClassNames = (hasMargin?: boolean, isActive?: boolean) => {
- const { classes } = this.props;
- return classnames({
- [classes.hasMargin]: hasMargin,
- [classes.active]: isActive
- });
- }
-
- getListItemTextClassNames = (isActive?: boolean) => {
- const { classes } = this.props;
- return classnames(classes.listItemText, {
- [classes.active]: isActive
- });
- }
-
-
}
type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active';
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list