@@ -22,6 +22,8 @@ export class Thesis extends Component {
22
22
icon,
23
23
label,
24
24
} = this . props ;
25
+ const uniWidth = department && type ? 6 : 16 ;
26
+
25
27
return (
26
28
< >
27
29
{ label && (
@@ -31,7 +33,7 @@ export class Thesis extends Component {
31
33
</ >
32
34
) }
33
35
< Grid padded >
34
- < Grid . Column width = "6" >
36
+ < Grid . Column width = { uniWidth } >
35
37
< Input
36
38
fieldPath = { `${ fieldPath } .university` }
37
39
label = { university . label }
@@ -41,26 +43,32 @@ export class Thesis extends Component {
41
43
< label className = "helptext mb-0" > { university . description } </ label >
42
44
) }
43
45
</ Grid . Column >
44
- < Grid . Column width = "6" >
45
- < Input
46
- fieldPath = { `${ fieldPath } .department` }
47
- label = { department . label }
48
- placeholder = { department . placeholder }
49
- />
50
- { department . description && (
51
- < label className = "helptext mb-0" > { department . description } </ label >
52
- ) }
53
- </ Grid . Column >
54
- < Grid . Column width = "4" >
55
- < Input
56
- fieldPath = { `${ fieldPath } .type` }
57
- label = { type . label }
58
- placeholder = { type . placeholder }
59
- />
60
- { type . description && (
61
- < label className = "helptext mb-0" > { type . description } </ label >
62
- ) }
63
- </ Grid . Column >
46
+
47
+ { department && (
48
+ < Grid . Column width = { 6 } >
49
+ < Input
50
+ fieldPath = { `${ fieldPath } .department` }
51
+ label = { department . label }
52
+ placeholder = { department . placeholder }
53
+ />
54
+ { department . description && (
55
+ < label className = "helptext mb-0" > { department . description } </ label >
56
+ ) }
57
+ </ Grid . Column >
58
+ ) }
59
+
60
+ { type && (
61
+ < Grid . Column width = { 4 } >
62
+ < Input
63
+ fieldPath = { `${ fieldPath } .type` }
64
+ label = { type . label }
65
+ placeholder = { type . placeholder }
66
+ />
67
+ { type . description && (
68
+ < label className = "helptext mb-0" > { type . description } </ label >
69
+ ) }
70
+ </ Grid . Column >
71
+ ) }
64
72
</ Grid >
65
73
</ >
66
74
) ;
0 commit comments