File tree Expand file tree Collapse file tree 8 files changed +406
-233
lines changed Expand file tree Collapse file tree 8 files changed +406
-233
lines changed Original file line number Diff line number Diff line change 21
21
.button-primary {
22
22
background-color : var (--color-primary )!important ;
23
23
color : var (--color-text-on-primary )!important ;
24
+ padding : var (--spacing-small ) var (--spacing-medium )!important ;
24
25
}
25
26
}
26
27
Original file line number Diff line number Diff line change 7
7
.icon {
8
8
flex-shrink : 0 ;
9
9
padding : 0 var (--spacing-small );
10
+ color : var (--color-accent );
10
11
font-size : var (--font-size-extra-large );
11
12
}
12
13
Original file line number Diff line number Diff line change 5
5
height : var (--height-progress-bar );
6
6
7
7
.progress {
8
+ transition : var (--duration-transition-slow ) width ease-in-out ;
8
9
border-radius : var (--radius-border-progress-bar );
9
10
background-color : var (--color-accent );
10
11
}
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import Icon from '#rscg/Icon';
6
6
7
7
import styles from './styles.scss' ;
8
8
9
- type Status = 'not-initiated' | 'pending' | 'completed' | 'failed' ;
9
+ export type Status = 'not-initiated' | 'pending' | 'completed' | 'failed' ;
10
+
10
11
interface Props {
11
12
className ?: string ;
12
13
status : Status ;
@@ -22,6 +23,15 @@ const iconNames: {
22
23
pending : 'checkmarkCircleEmpty' ,
23
24
} ;
24
25
26
+ const statusStyles : {
27
+ [ key in Status ] : string ;
28
+ } = {
29
+ 'not-initiated' : styles . notInitiated ,
30
+ completed : styles . completed ,
31
+ failed : styles . failed ,
32
+ pending : styles . pending ,
33
+ } ;
34
+
25
35
class TaskItem extends React . PureComponent < Props > {
26
36
public render ( ) {
27
37
const {
@@ -31,7 +41,7 @@ class TaskItem extends React.PureComponent<Props> {
31
41
} = this . props ;
32
42
33
43
return (
34
- < div className = { _cs ( styles . taskItem , className ) } >
44
+ < div className = { _cs ( styles . taskItem , className , statusStyles [ status ] ) } >
35
45
< div className = { styles . left } >
36
46
{ status === 'pending' ? (
37
47
< Spinner className = { styles . spinner } />
Original file line number Diff line number Diff line change 12
12
.right {
13
13
padding : var (--spacing-small ) var (--spacing-small );
14
14
}
15
+
16
+ & .not-initiated {
17
+ .left {
18
+ color : var (--color-primary );
19
+ }
20
+ }
21
+
22
+ & .completed {
23
+ .left {
24
+ color : var (--color-success );
25
+ }
26
+ }
27
+
28
+ & .failed {
29
+ .left {
30
+ color : var (--color-danger );
31
+ }
32
+ }
33
+
34
+ & .pending {
35
+ .right {
36
+ color : var (--color-primary );
37
+ font-weight : var (--font-weight-bold );
38
+ }
39
+ }
15
40
}
Original file line number Diff line number Diff line change @@ -2,10 +2,14 @@ const styleProperties = {
2
2
colorDarkBlue : '#394b59' ,
3
3
colorBlue : '#137cbd' ,
4
4
colorRed : '#d33f49' ,
5
+ colorGreen : '#14a775' ,
5
6
colorYellow : '#eb9316' ,
6
7
// fontFamilySansSerif: 'Roboto',
7
8
colorPrimary : 'var(--color-dark-blue)' ,
8
- colorAccent : 'var(--color-red)' ,
9
+ // colorPrimaryLight: 'var(--color-blue)',
10
+ colorAccent : 'var(--color-blue)' ,
11
+ colorSuccess : 'var(--color-green)' ,
12
+ colorDanger : 'var(--color-red)' ,
9
13
widthSidebarMin : '200px' ,
10
14
widthSidebarMax : '320px' ,
11
15
widthSidebar : '25%' ,
You can’t perform that action at this time.
0 commit comments