Skip to content
Snippets Groups Projects
Commit c2b9c176 authored by Alexandru Munteanu's avatar Alexandru Munteanu
Browse files

Add success icon on previous completed steps

parent 790504fe
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,8 @@ const Separator = () => <div className={classes.separator} />
const Step = ({ title, index, currentStep }) => (
<div className={classes.step}>
{index <= currentStep && <div className={classes.bullet} />}
{index === currentStep && <div className={classes.bullet} />}
{index < currentStep && <div className={classes.success}></div>}
<span className={classes.stepTitle}>{`${index + 1}. ${title}`}</span>
</div>
)
......
......@@ -8,7 +8,7 @@
}
.separator {
background-color: #444;
background-color: #555;
flex: 1;
height: 2px;
}
......@@ -39,3 +39,15 @@
white-space: normal;
width: 120px;
}
.success {
align-items: center;
background-color: #555;
border-radius: 50%;
color: #fff;
display: flex;
font-size: 12px;
height: 18px;
justify-content: center;
width: 18px;
}
......@@ -29,7 +29,7 @@ const Wizard = ({ journal: { wizard }, getSteps, step, incrementStep }) => (
export default compose(
withJournal,
withState('step', 'changeStep', 0),
withState('step', 'changeStep', 1),
withHandlers({
getSteps: ({ journal: { wizard } }) => () => wizard.map(w => w.label),
incrementStep: ({ changeStep }) => () => changeStep(step => step + 1),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment