@@ -5,53 +5,25 @@ import color from "@cdo/apps/util/color";
5
5
import i18n from '@cdo/locale' ;
6
6
7
7
const styles = {
8
- legendBox : {
9
- borderWidth : 1 ,
10
- float : 'left' ,
11
- display : 'inline-block' ,
12
- marginTop : 20 ,
13
- boxSizing : 'content-box' ,
14
- } ,
15
- progressBox : {
16
- float : 'left' ,
17
- width : 130 ,
18
- borderColor : color . lightest_gray ,
19
- borderWidth : 2 ,
20
- borderBottomStyle : 'solid' ,
21
- borderRightStyle : 'solid' ,
22
- } ,
23
- leftBorder : {
24
- borderColor : color . lightest_gray ,
25
- borderWidth : 2 ,
26
- borderLeftStyle : 'solid' ,
27
- } ,
28
- heading : {
29
- fontSize : 18 ,
8
+ header : {
30
9
fontWeight : 'bold' ,
31
10
color : color . charcoal ,
32
- float : 'left' ,
33
- paddingTop : 10 ,
34
- paddingBottom : 10 ,
35
- textAlign : 'center' ,
36
11
} ,
37
- label : {
38
- fontSize : 14 ,
39
- fontWeight : 900 ,
40
- color : color . charcoal ,
41
- } ,
42
- parenthetical : {
43
- fontSize : 10 ,
12
+ th : {
13
+ backgroundColor : color . lightest_gray ,
44
14
color : color . charcoal ,
15
+ border : `1px solid ${ color . lightest_gray } ` ,
16
+ fontFamily : '"Gotham 4r", sans-serif' ,
17
+ fontSize : 14 ,
18
+ textAlign : 'center' ,
19
+ padding : 15 ,
45
20
} ,
46
- labelBox : {
47
- padding : 10 ,
48
- height : 60 ,
49
- width : '100%' ,
50
- backgroundColor : color . lightest_gray ,
51
- textAlign : 'center'
21
+ td : {
22
+ border : `1px solid ${ color . lightest_gray } ` ,
23
+ padding : 15 ,
52
24
} ,
53
- boxContainer : {
54
- padding : '15px 50px ' ,
25
+ boxStyle : {
26
+ margin : '0 auto ' ,
55
27
}
56
28
} ;
57
29
@@ -61,78 +33,77 @@ export default class SummaryViewLegend extends Component {
61
33
} ;
62
34
63
35
render ( ) {
64
- const { showCSFProgressBox } = this . props ;
65
- const headingStyle = {
66
- ...styles . heading ,
67
- width : showCSFProgressBox ? '48%' : '100%'
68
- } ;
36
+ const { showCSFProgressBox} = this . props ;
69
37
70
38
return (
71
- < div style = { styles . legendBox } >
72
- < div >
73
- < div style = { headingStyle } > { i18n . lessonStatus ( ) } </ div >
74
- { showCSFProgressBox &&
75
- < div style = { headingStyle } > { i18n . completionStatus ( ) } </ div >
76
- }
77
- </ div >
78
- < div style = { styles . progressBox } >
79
- < div style = { styles . labelBox } >
80
- < div > { i18n . notStarted ( ) } </ div >
81
- </ div >
82
- < div style = { { ...styles . boxContainer , ...styles . leftBorder } } >
83
- < ProgressBox
84
- started = { false }
85
- incomplete = { 20 }
86
- imperfect = { 0 }
87
- perfect = { 0 }
88
- />
89
- </ div >
90
- </ div >
91
- < div style = { styles . progressBox } >
92
- < div style = { styles . labelBox } >
93
- < div > { i18n . inProgress ( ) } </ div >
94
- </ div >
95
- < div style = { styles . boxContainer } >
96
- < ProgressBox
97
- started = { true }
98
- incomplete = { 20 }
99
- imperfect = { 0 }
100
- perfect = { 0 }
101
- />
102
- </ div >
103
- </ div >
104
- < div style = { styles . progressBox } >
105
- < div style = { styles . labelBox } >
106
- < div > { i18n . completed ( ) } </ div >
107
- { showCSFProgressBox &&
108
- < div style = { styles . parenthetical } > ({ i18n . perfect ( ) } )</ div >
109
- }
110
- </ div >
111
- < div style = { styles . boxContainer } >
112
- < ProgressBox
113
- started = { true }
114
- incomplete = { 0 }
115
- imperfect = { 0 }
116
- perfect = { 20 }
117
- />
118
- </ div >
119
- </ div >
120
- { showCSFProgressBox &&
121
- < div style = { styles . progressBox } >
122
- < div style = { styles . labelBox } >
123
- < div > { i18n . completed ( ) } </ div >
124
- < div style = { styles . parenthetical } > ({ i18n . tooManyBlocks ( ) } )</ div >
125
- </ div >
126
- < div style = { styles . boxContainer } >
127
- < ProgressBox
128
- started = { true }
129
- incomplete = { 0 }
130
- imperfect = { 20 }
131
- perfect = { 0 }
132
- />
133
- </ div >
134
- </ div >
135
- }
39
+ < div style = { { marginTop : 30 } } >
40
+ < h4 style = { styles . header } > { i18n . lessonStatus ( ) } </ h4 >
41
+ < table >
42
+ < thead >
43
+ < tr >
44
+ < th style = { styles . th } > { i18n . notStarted ( ) } </ th >
45
+ < th style = { styles . th } > { i18n . inProgress ( ) } </ th >
46
+ < th style = { styles . th } >
47
+ { i18n . completed ( ) }
48
+ { showCSFProgressBox &&
49
+ < span >
50
+ < br />
51
+ { `(${ i18n . perfect ( ) } )` }
52
+ </ span >
53
+ }
54
+ </ th >
55
+ { showCSFProgressBox &&
56
+ < th style = { styles . th } >
57
+ { i18n . completed ( ) }
58
+ < br />
59
+ { `(${ i18n . tooManyBlocks ( ) } )` }
60
+ </ th >
61
+ }
62
+ </ tr >
63
+ </ thead >
64
+ < tbody >
65
+ < tr >
66
+ < td style = { styles . td } >
67
+ < ProgressBox
68
+ style = { styles . boxStyle }
69
+ started = { false }
70
+ incomplete = { 20 }
71
+ imperfect = { 0 }
72
+ perfect = { 0 }
73
+ />
74
+ </ td >
75
+ < td style = { styles . td } >
76
+ < ProgressBox
77
+ style = { styles . boxStyle }
78
+ started = { true }
79
+ incomplete = { 20 }
80
+ imperfect = { 0 }
81
+ perfect = { 0 }
82
+ />
83
+ </ td >
84
+ < td style = { styles . td } >
85
+ < ProgressBox
86
+ style = { styles . boxStyle }
87
+ started = { true }
88
+ incomplete = { 0 }
89
+ imperfect = { 0 }
90
+ perfect = { 20 }
91
+ />
92
+ </ td >
93
+ { showCSFProgressBox &&
94
+ < td style = { styles . td } >
95
+ < ProgressBox
96
+ style = { styles . boxStyle }
97
+ started = { true }
98
+ incomplete = { 0 }
99
+ imperfect = { 20 }
100
+ perfect = { 0 }
101
+ />
102
+ </ td >
103
+ }
104
+ </ tr >
105
+ </ tbody >
106
+ </ table >
136
107
</ div >
137
108
) ;
138
109
}
0 commit comments