Skip to content

Commit d784b1e

Browse files
authored
Merge pull request #8 from posm/feature/add-behavior-dashboard
Add PosmStates and PosmStatus
2 parents 2ba58f8 + 8c5f43d commit d784b1e

File tree

8 files changed

+406
-233
lines changed

8 files changed

+406
-233
lines changed

src/Root/App/Multiplexer/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
.button-primary {
2222
background-color: var(--color-primary)!important;
2323
color: var(--color-text-on-primary)!important;
24+
padding: var(--spacing-small) var(--spacing-medium)!important;
2425
}
2526
}
2627

src/components/Info/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.icon {
88
flex-shrink: 0;
99
padding: 0 var(--spacing-small);
10+
color: var(--color-accent);
1011
font-size: var(--font-size-extra-large);
1112
}
1213

src/components/ProgressBar/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
height: var(--height-progress-bar);
66

77
.progress {
8+
transition: var(--duration-transition-slow) width ease-in-out;
89
border-radius: var(--radius-border-progress-bar);
910
background-color: var(--color-accent);
1011
}

src/components/TaskItem/index.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import Icon from '#rscg/Icon';
66

77
import styles from './styles.scss';
88

9-
type Status = 'not-initiated' | 'pending' | 'completed' | 'failed';
9+
export type Status = 'not-initiated' | 'pending' | 'completed' | 'failed';
10+
1011
interface Props {
1112
className?: string;
1213
status: Status;
@@ -22,6 +23,15 @@ const iconNames: {
2223
pending: 'checkmarkCircleEmpty',
2324
};
2425

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+
2535
class TaskItem extends React.PureComponent<Props> {
2636
public render() {
2737
const {
@@ -31,7 +41,7 @@ class TaskItem extends React.PureComponent<Props> {
3141
} = this.props;
3242

3343
return (
34-
<div className={_cs(styles.taskItem, className)}>
44+
<div className={_cs(styles.taskItem, className, statusStyles[status])}>
3545
<div className={styles.left}>
3646
{ status === 'pending' ? (
3747
<Spinner className={styles.spinner} />

src/components/TaskItem/styles.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,29 @@
1212
.right {
1313
padding: var(--spacing-small) var(--spacing-small);
1414
}
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+
}
1540
}

src/constants/styleProperties.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ const styleProperties = {
22
colorDarkBlue: '#394b59',
33
colorBlue: '#137cbd',
44
colorRed: '#d33f49',
5+
colorGreen: '#14a775',
56
colorYellow: '#eb9316',
67
// fontFamilySansSerif: 'Roboto',
78
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)',
913
widthSidebarMin: '200px',
1014
widthSidebarMax: '320px',
1115
widthSidebar: '25%',

0 commit comments

Comments
 (0)