@@ -73,52 +73,48 @@ const UserEditor = (props) => {
7373 return (
7474 < BasePageContainer >
7575 < BasePageToolbar title = { 'Edit user' } > </ BasePageToolbar >
76- < Grid container xs = { 12 } >
77- < Grid item xs = { 6 } >
78- < Paper >
79- < form onSubmit = { handleSubmit } >
80- < FormControl className = { classes . control } >
81- < InputLabel > First Name</ InputLabel >
82- < Input value = { user . firstName } name = "firstName" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
83- </ FormControl >
84- < FormControl className = { classes . control } >
85- < InputLabel > Last Name</ InputLabel >
86- < Input value = { user . lastName } name = "lastName" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
87- </ FormControl >
88- < FormControl className = { classes . control } >
89- < InputLabel > User Name</ InputLabel >
90- < Input value = { user . username } name = "username" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
91- </ FormControl >
92- < FormControl className = { classes . control } >
93- < InputLabel > Email</ InputLabel >
94- < Input value = { user . email } name = "email" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
95- </ FormControl >
96- < FormControl className = { classes . control } >
97- < InputLabel > Global Role</ InputLabel >
98- < Select
99- labelId = "Set Global Role"
100- id = "globalRole"
101- value = { user . globalRole }
102- onChange = { setGlobalRole }
103- className = { classes . width }
104- >
105- < MenuItem value = { user . globalRole } > { user . globalRole } </ MenuItem >
106- < MenuItem value = 'user' > user</ MenuItem >
107- < MenuItem value = 'support' > support</ MenuItem >
108- </ Select >
109- </ FormControl >
110- < Button
111- variant = "contained"
112- color = "primary"
113- type = "submit"
114- className = { `${ classes . margin } ${ classes . width } ` }
115- startIcon = { < SaveIcon /> }
116- >
117- Edit User
118- </ Button >
119- </ form >
120- </ Paper >
121- </ Grid >
76+ < Grid container xs = { 12 } component = { Paper } className = { classes . box } >
77+ < form onSubmit = { handleSubmit } >
78+ < FormControl className = { classes . control } >
79+ < InputLabel > First Name</ InputLabel >
80+ < Input value = { user . firstName } name = "firstName" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
81+ </ FormControl >
82+ < FormControl className = { classes . control } >
83+ < InputLabel > Last Name</ InputLabel >
84+ < Input value = { user . lastName } name = "lastName" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
85+ </ FormControl >
86+ < FormControl className = { classes . control } >
87+ < InputLabel > User Name</ InputLabel >
88+ < Input value = { user . username } name = "username" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
89+ </ FormControl >
90+ < FormControl className = { classes . control } >
91+ < InputLabel > Email</ InputLabel >
92+ < Input value = { user . email } name = "email" className = { classes . width } onChange = { e => onChangeHandler ( e ) } />
93+ </ FormControl >
94+ < FormControl className = { classes . control } >
95+ < InputLabel > Global Role</ InputLabel >
96+ < Select
97+ labelId = "Set Global Role"
98+ id = "globalRole"
99+ value = { user . globalRole }
100+ onChange = { setGlobalRole }
101+ className = { classes . width }
102+ >
103+ < MenuItem value = { user . globalRole } > { user . globalRole } </ MenuItem >
104+ < MenuItem value = 'user' > user</ MenuItem >
105+ < MenuItem value = 'support' > support</ MenuItem >
106+ </ Select >
107+ </ FormControl >
108+ < Button
109+ variant = "contained"
110+ color = "primary"
111+ type = "submit"
112+ className = { `${ classes . margin } ${ classes . width } ` }
113+ startIcon = { < SaveIcon /> }
114+ >
115+ Edit User
116+ </ Button >
117+ </ form >
122118 </ Grid >
123119 </ BasePageContainer >
124120 )
@@ -129,8 +125,12 @@ UserEditor.propTypes = {
129125}
130126
131127const useStyles = makeStyles ( theme => ( {
128+ box : {
129+ padding : 16
130+ } ,
132131 control : {
133- display : 'block'
132+ display : 'block' ,
133+ marginTop : 16
134134 } ,
135135 margin : {
136136 marginTop : 16
0 commit comments