@@ -5,21 +5,23 @@ var taskCheckbox_1 = require('./taskCheckbox');
5
5
var List_1 = require ( 'material-ui/List' ) ;
6
6
var colors_1 = require ( 'material-ui/styles/colors' ) ;
7
7
var styles = {
8
- margin :'5px' ,
9
- padding :'5px' ,
10
- position :'relative'
11
- } ;
12
- var indexStyles = {
13
- position :'absolute' ,
14
- top :'20px' ,
15
- left :'45px' ,
16
- } ;
17
- var descriptionStyles = {
18
- backgroundColor :'inherit' ,
19
- paddingTop :'-10px' ,
20
- paddingLeft :'55px' ,
21
- fontSize :'14px' ,
22
- lineHeight :'1.6' ,
8
+ task :{
9
+ margin :'5px' ,
10
+ padding :'5px' ,
11
+ position :'relative'
12
+ } ,
13
+ index :{
14
+ position :'absolute' ,
15
+ top :'20px' ,
16
+ left :'45px' ,
17
+ } ,
18
+ description :{
19
+ backgroundColor :'inherit' ,
20
+ paddingTop :'-10px' ,
21
+ paddingLeft :'55px' ,
22
+ fontSize :'14px' ,
23
+ lineHeight :'1.6' ,
24
+ } ,
23
25
} ;
24
26
function getStatus ( index , taskPosition , testRun ) {
25
27
return index < taskPosition ?colors_1 . lightGreen200 :'inherit' ;
@@ -28,7 +30,7 @@ var Task = function (_a) {
28
30
var task = _a . task , taskPosition = _a . taskPosition , index = _a . index , testRun = _a . testRun ;
29
31
var backgroundColor = getStatus ( index , taskPosition , testRun ) ;
30
32
var isCurrentTask = taskPosition === index ;
31
- return ( React . createElement ( List_1 . ListItem , { key :index , style :Object . assign ( { } , styles , { backgroundColor :backgroundColor } ) } , taskCheckbox_1 . default ( isCurrentTask , testRun ) , React . createElement ( "span" , { style :indexStyles } , index + 1 , "." ) , React . createElement ( "div" , { style :descriptionStyles } , React . createElement ( index_1 . Markdown , null , task . description ) ) ) ) ;
33
+ return ( React . createElement ( List_1 . ListItem , { key :index , style :Object . assign ( { } , styles . task , { backgroundColor :backgroundColor } ) } , taskCheckbox_1 . default ( isCurrentTask , testRun ) , React . createElement ( "span" , { style :styles . index } , index + 1 , "." ) , React . createElement ( "div" , { style :styles . description } , React . createElement ( index_1 . Markdown , null , task . description ) ) ) ) ;
32
34
} ;
33
35
Object . defineProperty ( exports , "__esModule" , { value :true } ) ;
34
36
exports . default = Task ;