[ARVADOS-WORKBENCH2] updated: 1.2.0-743-gbd9e873
Git user
git at public.curoverse.com
Fri Oct 26 10:50:39 EDT 2018
Summary of changes:
.../sharing-dialog/permission-select.tsx | 32 +++++++++++++---------
1 file changed, 19 insertions(+), 13 deletions(-)
via bd9e873a8c5995ed74bf70114e7fb90ab14d1c1e (commit)
from a60d90f0ee4d4cd71ccc876b112911f437ffb974 (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 bd9e873a8c5995ed74bf70114e7fb90ab14d1c1e
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Oct 26 16:49:51 2018 +0200
Improve permission select styles
Feature #14365
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/views-components/sharing-dialog/permission-select.tsx b/src/views-components/sharing-dialog/permission-select.tsx
index 6a88922..582f3bc 100644
--- a/src/views-components/sharing-dialog/permission-select.tsx
+++ b/src/views-components/sharing-dialog/permission-select.tsx
@@ -44,32 +44,38 @@ export const PermissionSelect = withStyles(PermissionSelectStyles)(
const renderPermissionItem = (value: string) =>
<PermissionItem {...{ value }} />;
-type PermissionItemClasses = 'value';
+type PermissionItemClasses = 'value' | 'icon';
const permissionItemStyles: StyleRulesCallback<PermissionItemClasses> = theme => ({
value: {
marginLeft: theme.spacing.unit,
+ },
+ icon: {
+ margin: `-${theme.spacing.unit / 2}px 0`,
}
});
const PermissionItem = withStyles(permissionItemStyles)(
- ({ value, classes }: { value: string } & WithStyles<PermissionItemClasses>) =>
- <Grid container alignItems='center'>
- {renderPermissionIcon(value)}
- <span className={classes.value}>
- {value}
- </span>
- </Grid>);
+ ({ value, classes }: { value: string } & WithStyles<PermissionItemClasses>) => {
+ const Icon = getIcon(value);
+ return (
+ <Grid container alignItems='center'>
+ <Icon className={classes.icon} />
+ <span className={classes.value}>
+ {value}
+ </span>
+ </Grid>);
+ });
-const renderPermissionIcon = (value: string) => {
+const getIcon = (value: string) => {
switch (value) {
case PermissionSelectValue.READ:
- return <RemoveRedEye />;
+ return RemoveRedEye;
case PermissionSelectValue.WRITE:
- return <Edit />;
+ return Edit;
case PermissionSelectValue.MANAGE:
- return <Computer />;
+ return Computer;
default:
- return null;
+ return Computer;
}
};
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list