-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
159 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import PropTypes from 'prop-types'; | ||
|
||
import './index.scss'; | ||
|
||
export default function StepProgress({ current }) { | ||
return ( | ||
<div className="arrow-steps clearfix"> | ||
<div className={`step ${ current === 1 ? 'current' : null } ${ current > 1 ? 'done' : null } `}> | ||
<span>1. Requests</span> | ||
</div> | ||
<div className={`step ${ current === 2 ? 'current' : null } ${ current > 2 ? 'done' : null } `}> | ||
<span>2. Concat</span> | ||
</div> | ||
<div className={`step ${ current === 3 ? 'current' : null } ${ current > 3 ? 'done' : null } `}> | ||
<span>3. Dedup</span> | ||
</div> | ||
<div className={`step ${ current === 4 ? 'current' : null } ${ current > 4 ? 'done' : null } `}> | ||
<span>4. GroupBy</span> | ||
</div> | ||
<div className={`step ${ current === 5 ? 'current' : null } ${ current > 5 ? 'done' : null } `}> | ||
<span>5. Sort</span> | ||
</div> | ||
<div className={`step ${ current === 6 ? 'current' : null } ${ current > 6 ? 'done' : null } `}> | ||
<span>6. Facet</span> | ||
</div> | ||
<div className={`step ${ current === 7 ? 'current' : null } ${ current > 7 ? 'done' : null } `}> | ||
<span>7. Serialization</span> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
StepProgress.propTypes = { | ||
current: PropTypes.number.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
// https://codepen.io/wongmingto/pen/eLGYxy | ||
|
||
.clearfix:after { | ||
clear: both; | ||
content: ""; | ||
display: block; | ||
height: 0; | ||
} | ||
|
||
.arrow-steps { | ||
margin-top: 20px; | ||
} | ||
|
||
.arrow-steps .step { | ||
font-size: 14px; | ||
text-align: center; | ||
color: #777; | ||
cursor: default; | ||
margin: 0; | ||
padding: 10px 0px 10px 0px; | ||
width: 14%; | ||
float: left; | ||
position: relative; | ||
background-color: #ddd; | ||
-webkit-user-select: none; | ||
-moz-user-select: none; | ||
-ms-user-select: none; | ||
user-select: none; | ||
} | ||
|
||
.arrow-steps .step:after, | ||
.arrow-steps .step:before { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
right: -15px; | ||
width: 0; | ||
height: 0; | ||
border-top: 19px solid transparent; | ||
border-bottom: 17px solid transparent; | ||
border-left: 17px solid #ddd; | ||
z-index: 2; | ||
} | ||
|
||
.arrow-steps .step:before { | ||
right: auto; | ||
left: 0; | ||
border-left: 17px solid #fff; | ||
z-index: 0; | ||
} | ||
|
||
.arrow-steps .step:first-child:before { | ||
border: none; | ||
} | ||
|
||
.arrow-steps .step:first-child { | ||
border-top-left-radius: 4px; | ||
border-bottom-left-radius: 4px; | ||
} | ||
|
||
.arrow-steps .step:last-child { | ||
border-top-right-radius: 4px; | ||
border-bottom-right-radius: 4px; | ||
} | ||
|
||
.arrow-steps .step span { | ||
display: block; | ||
height: 16px; | ||
position: relative; | ||
} | ||
|
||
*.arrow-steps .step.done span:before { | ||
opacity: 1; | ||
content: ""; | ||
position: absolute; | ||
top: -2px; | ||
left: -10px; | ||
font-size: 11px; | ||
line-height: 21px; | ||
} | ||
|
||
.arrow-steps .step.current { | ||
color: #fff; | ||
background-color: #5599e5; | ||
} | ||
|
||
.arrow-steps .step.current:after { | ||
border-left: 17px solid #5599e5; | ||
} | ||
|
||
.arrow-steps .step.done { | ||
color: #173352; | ||
background-color: #2f69aa; | ||
} | ||
|
||
.arrow-steps .step.done:after { | ||
border-left: 17px solid #2f69aa; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters