1
1
import type { Interpolation , Theme } from "@emotion/react" ;
2
+ import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined" ;
3
+ import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined" ;
2
4
import Button from "@mui/material/Button" ;
3
5
import Checkbox from "@mui/material/Checkbox" ;
4
6
import FormControlLabel from "@mui/material/FormControlLabel" ;
@@ -28,7 +30,7 @@ import {
28
30
FormFields ,
29
31
FormFooter ,
30
32
FormSection ,
31
- HorizontalForm ,
33
+ VerticalForm ,
32
34
} from "components/Form/Form" ;
33
35
import { PageHeader , PageHeaderTitle } from "components/PageHeader/PageHeader" ;
34
36
import { getFormHelpers , nameValidator } from "utils/formUtils" ;
@@ -103,7 +105,7 @@ export const CreateEditRolePageView: FC<CreateEditRolePageViewProps> = ({
103
105
{ role ? "Edit" : "Create" } custom role
104
106
</ PageHeaderTitle >
105
107
</ PageHeader >
106
- < HorizontalForm onSubmit = { form . handleSubmit } >
108
+ < VerticalForm onSubmit = { form . handleSubmit } >
107
109
< FormSection
108
110
title = "Role settings"
109
111
description = "Set a name and permissions for this role."
@@ -144,7 +146,7 @@ export const CreateEditRolePageView: FC<CreateEditRolePageViewProps> = ({
144
146
submitLabel = { role !== undefined ? "Save" : "Create Role" }
145
147
/>
146
148
) }
147
- </ HorizontalForm >
149
+ </ VerticalForm >
148
150
</ >
149
151
) ;
150
152
} ;
@@ -222,6 +224,7 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({
222
224
< Table >
223
225
< TableHead >
224
226
< TableRow >
227
+ < TableCell > Permission</ TableCell >
225
228
< TableCell
226
229
align = "right"
227
230
sx = { { paddingTop : 0.4 , paddingBottom : 0.4 } }
@@ -237,6 +240,8 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({
237
240
onChange = { ( e ) =>
238
241
setShowAllResources ( e . currentTarget . checked )
239
242
}
243
+ checkedIcon = { < VisibilityOutlinedIcon /> }
244
+ icon = { < VisibilityOffOutlinedIcon /> }
240
245
/>
241
246
}
242
247
label = {
@@ -258,6 +263,7 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({
258
263
< li key = { actionKey } >
259
264
< span css = { styles . actionText } >
260
265
< Checkbox
266
+ size = "small"
261
267
name = { `${ resourceKey } :${ actionKey } ` }
262
268
checked = { checkedActions ?. some ( ( p ) =>
263
269
ResourceActionComparator (
@@ -279,6 +285,7 @@ const ActionCheckboxes: FC<ActionCheckboxesProps> = ({
279
285
</ ul >
280
286
</ li >
281
287
</ TableCell >
288
+ < TableCell />
282
289
</ TableRow >
283
290
) ;
284
291
} ) }
0 commit comments