Skip to content

Commit

Permalink
[WV-320] fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kordonets committed Apr 8, 2024
1 parent 4ad35ec commit 1472dbd
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class CompleteYourProfile2024 extends Component {
description: '',
onClick: this.openHowItWorksModal,
titleCanBeClicked: true,
width: '29%',
width: '33.33%',
},
{
id: stepIdPersonalizedScore,
Expand All @@ -170,7 +170,7 @@ class CompleteYourProfile2024 extends Component {
description: '',
onClick: this.openPersonalizedScoreIntroModal,
titleCanBeClicked: true,
width: '29%',
width: '33.33%',
},
{
id: stepIdSignInToSave,
Expand All @@ -180,7 +180,7 @@ class CompleteYourProfile2024 extends Component {
description: '',
onClick: this.toggleShowSignInModal,
titleCanBeClicked: !voterIsSignedIn,
width: '42%',
width: '33.33%',
},
],
}, () => this.setCompletedStatus());
Expand Down Expand Up @@ -365,7 +365,7 @@ const HowItWorksContainer = styled('div')`
alignItems: 'center';
// height: 168px;
border-radius: 10px;
border: 1px solid ${Colors.lightGrey};
border: 1px solid #B0B0B0;
background: ${Colors.primary50};
margin-bottom: 22px;
overflow: hidden;
Expand Down Expand Up @@ -397,7 +397,6 @@ const HowItWorksStepsContainer = styled('div')`
display: flex;
flex-direction: row;
justify-content: space-evenly;
padding-top: 16px;
`;

export default CompleteYourProfile2024;
59 changes: 37 additions & 22 deletions src/js/components/CompleteYourProfile/Step.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ import styled from 'styled-components';
import Colors from '../../common/components/Style/Colors';
import StepIcon from './StepIcon';

const Step = ({ onClick, step, label, completed, width }) => (
<HowItWorksStep completed={completed} onClick={onClick} width={width}>
<StepIcon
const Step = ({ onClick, step, label, completed, width }) => {
console.log('Step', step);

return (
<HowItWorksStep completed={completed} onClick={onClick} width={width}>
<StepIcon
number={step}
completed={completed}
/>
<p>{label}</p>
</HowItWorksStep>
);
/>
<p>{label}</p>
</HowItWorksStep>
);
};


Step.propTypes = {
onClick: PropTypes.func.isRequired,
Expand All @@ -22,22 +27,32 @@ Step.propTypes = {
width: PropTypes.string,
};


const HowItWorksStep = styled.div`
display: flex;
flex-direction: column;
align-items: center;
width: ${({ width }) => width};
padding: 0 12px;
cursor: pointer;
${({ completed }) => `
p {
color: ${completed ? '#007800' : Colors.primary2024};
text-align: center;
font-size: 16px;
font-weight: 400;
margin-top: 6px;
}
display: flex;
width: 33.33%;
flex-direction: column;
align-items: center;
// width: ${({ width }) => width};
padding: 0 12px;
padding-top: 18px;
cursor: pointer;
border-right: 0.5px solid #B0B0B0;
border-left: 0.5px solid #B0B0B0;
&:hover {
background-color: #EEEEEE;
}
${({ completed }) => `
p {
color: ${completed ? '#007800' : Colors.primary2024};
text-align: center;
font-size: 16px;
font-weight: 400;
margin-top: 6px;
}
`}
`;
export default Step;
Expand Down

0 comments on commit 1472dbd

Please sign in to comment.