X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/3f809e0be2a712d1e576f1b2acf4aff73e0f16b0..17dfef9d2440ddbac9cd8eac0ec8be721b42cc09:/src/views-components/sharing-dialog/permission-select.tsx

diff --git a/src/views-components/sharing-dialog/permission-select.tsx b/src/views-components/sharing-dialog/permission-select.tsx
index 07a1662d..3c4471f6 100644
--- a/src/views-components/sharing-dialog/permission-select.tsx
+++ b/src/views-components/sharing-dialog/permission-select.tsx
@@ -2,12 +2,11 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
-import { MenuItem, Select, withStyles, StyleRulesCallback } from '@material-ui/core';
+import React from 'react';
+import { MenuItem, Select } from '@material-ui/core';
 import RemoveRedEye from '@material-ui/icons/RemoveRedEye';
 import Edit from '@material-ui/icons/Edit';
 import Computer from '@material-ui/icons/Computer';
-import { WithStyles } from '@material-ui/core/styles';
 import { SelectProps } from '@material-ui/core/Select';
 import { SelectItem } from './select-item';
 import { PermissionLevel } from '../../models/permission';
@@ -44,30 +43,21 @@ export const formatPermissionLevel = (value: PermissionLevel) => {
     }
 };
 
-type PermissionSelectClasses = 'value';
 
-const PermissionSelectStyles: StyleRulesCallback<PermissionSelectClasses> = theme => ({
-    value: {
-        marginLeft: theme.spacing.unit,
-    }
-});
-
-export const PermissionSelect = withStyles(PermissionSelectStyles)(
-    ({ classes, ...props }: SelectProps & WithStyles<PermissionSelectClasses>) =>
-        <Select
-            {...props}
-            renderValue={renderPermissionItem}
-            inputProps={{ classes }}>
-            <MenuItem value={PermissionSelectValue.READ}>
-                {renderPermissionItem(PermissionSelectValue.READ)}
-            </MenuItem>
-            <MenuItem value={PermissionSelectValue.WRITE}>
-                {renderPermissionItem(PermissionSelectValue.WRITE)}
-            </MenuItem>
-            <MenuItem value={PermissionSelectValue.MANAGE}>
-                {renderPermissionItem(PermissionSelectValue.MANAGE)}
-            </MenuItem>
-        </Select>);
+export const PermissionSelect = (props: SelectProps) =>
+    <Select
+        {...props}
+        renderValue={renderPermissionItem}>
+        <MenuItem value={PermissionSelectValue.READ}>
+            {renderPermissionItem(PermissionSelectValue.READ)}
+        </MenuItem>
+        <MenuItem value={PermissionSelectValue.WRITE}>
+            {renderPermissionItem(PermissionSelectValue.WRITE)}
+        </MenuItem>
+        <MenuItem value={PermissionSelectValue.MANAGE}>
+            {renderPermissionItem(PermissionSelectValue.MANAGE)}
+        </MenuItem>
+    </Select>;
 
 const renderPermissionItem = (value: string) =>
     <SelectItem {...{ value, icon: getIcon(value) }} />;
