Skip to content

Commit ac33c90

Browse files
authored
Merge pull request topcoder-archive#388 from yoution/issue-376
fix: issue topcoder-archive#375 deploy error
2 parents d167be4 + bb7dd97 commit ac33c90

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Progress Sidebar
3+
* Shows level of progress through skill
4+
* input process and contains a button for
5+
* searching for users or submitting the job.
6+
*/
7+
import Button from "components/Button";
8+
import React from "react";
9+
import cn from "classnames";
10+
import PT from "prop-types";
11+
import ProgressBar from "../ProgressBar";
12+
import "./styles.module.scss";
13+
import IconMultipleActionsCheck from "../../../../assets/images/icon-multiple-actions-check-2.svg";
14+
import IconListQuill from "../../../../assets/images/icon-list-quill.svg";
15+
import IconOfficeFileText from "../../../../assets/images/icon-office-file-text.svg";
16+
17+
function Progress({
18+
extraStyleName,
19+
isDisabled,
20+
onClick,
21+
buttonLabel,
22+
stages,
23+
percentage,
24+
}) {
25+
26+
let backgroundIcon
27+
if (extraStyleName === "input-skills") {
28+
backgroundIcon= <IconListQuill styleName="transparent-icon" />
29+
} else if (extraStyleName === "input-job-description") {
30+
backgroundIcon= <IconOfficeFileText styleName="transparent-icon" />
31+
} else {
32+
backgroundIcon= <IconMultipleActionsCheck styleName="transparent-icon" />
33+
}
34+
35+
return (
36+
<div styleName={cn("progress", extraStyleName)}>
37+
<ProgressBar percentDone={percentage} />
38+
<ul styleName="list">
39+
{stages.map((stage) => (
40+
<li
41+
styleName={cn("list-item", {
42+
active: stage.isCurrent,
43+
done: stage.completed,
44+
})}
45+
>
46+
{stage.name}
47+
</li>
48+
))}
49+
</ul>
50+
<Button
51+
size="medium"
52+
type="secondary"
53+
disabled={isDisabled}
54+
onClick={onClick}
55+
>
56+
{buttonLabel}
57+
</Button>
58+
{backgroundIcon}
59+
</div>
60+
);
61+
}
62+
63+
Progress.propTypes = {
64+
extraStyleName: PT.string,
65+
isDisabled: PT.bool,
66+
onClick: PT.func,
67+
buttonLabel: PT.string,
68+
currentStageIdx: PT.number,
69+
stages: PT.arrayOf(PT.string),
70+
};
71+
72+
export default Progress;
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
@import "styles/include";
2+
3+
.progress {
4+
@include rounded-card;
5+
overflow: hidden;
6+
padding: 12px;
7+
position: relative;
8+
width: 250px;
9+
color: #fff;
10+
button {
11+
border: none;
12+
}
13+
}
14+
15+
.input-job-description {
16+
background-image: linear-gradient(135deg, #2984BD 0%, #0AB88A 100%);
17+
}
18+
19+
.input-skills {
20+
background-image: linear-gradient(221.5deg, #646CD0 0%, #9d41c9 100%);
21+
}
22+
23+
.role-selection {
24+
background-image: linear-gradient(45deg, #8B41B0 0%, #EF476F 100%);
25+
}
26+
27+
.list {
28+
margin-bottom: 55px;
29+
& + button[disabled] {
30+
background-color: #E9E9E9;
31+
color: #FFF;
32+
opacity: 1;
33+
filter: none;
34+
}
35+
}
36+
37+
.list-item {
38+
margin-bottom: 14px;
39+
font-size: 14px;
40+
line-height: 16px;
41+
font-weight: 400;
42+
43+
&:before {
44+
content: "";
45+
color: #fff;
46+
border: 1px solid #ffffff;
47+
border-radius: 100%;
48+
width: 16px;
49+
height: 16px;
50+
margin-right: 10px;
51+
display: block;
52+
float: left;
53+
}
54+
55+
&.active {
56+
font-weight: 500;
57+
&:before {
58+
background-color: #fff;
59+
}
60+
}
61+
62+
&.done {
63+
font-weight: 400;
64+
color: rgba(255, 255, 255, 0.6);
65+
&:before {
66+
content: "";
67+
font-size: 9px;
68+
line-height: 14px;
69+
padding-left: 2px;
70+
}
71+
}
72+
}
73+
74+
.transparent-icon {
75+
position: absolute;
76+
right: -50px;
77+
top: 85px;
78+
opacity: 10%;
79+
width: 144px;
80+
height: 144px;
81+
}

0 commit comments

Comments
 (0)