Skip to content

Commit ed101b3

Browse files
author
Ian Wensink
committed
feat(styled-components): fix wizard step alignment issues
1 parent ef41de8 commit ed101b3

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/Wizard/WizardProgress/styled/bar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export default styled.ul`
44
display: flex;
55
margin: 0 0 calc(2 * ${p => p.theme.spacingUnit}) 0;
66
padding: 0;
7-
width: 100%;
7+
width: calc(100% - 15px);
88
`;

src/Wizard/WizardProgress/styled/step-title.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export default styled.span`
44
display: none;
55
66
@media (min-width: 768px) {
7+
line-height: 1em;
78
display: block;
89
}
910
`;

src/Wizard/WizardProgress/styled/step.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,20 @@ export default styled.li`
77
margin-right: 5px;
88
background: #f4f4f4;
99
z-index: ${p => 11 - p.step};
10+
margin-left: -5px;
11+
12+
&:first-child {
13+
margin-left: 0;
14+
}
1015
1116
&::before {
1217
position: absolute;
1318
content: '';
1419
top: 0;
1520
left: 0;
1621
border-left: 20px solid #fff;
17-
border-bottom: 24px solid transparent;
18-
border-top: 24px solid transparent;
22+
border-bottom: 22.5px solid transparent;
23+
border-top: 22.5px solid transparent;
1924
clear: both;
2025
}
2126
@@ -25,12 +30,12 @@ export default styled.li`
2530
top: 0;
2631
right: -20px;
2732
border-left: 20px solid #f4f4f4;
28-
border-bottom: 24px solid transparent;
29-
border-top: 24px solid transparent;
33+
border-bottom: 22.5px solid transparent;
34+
border-top: 22.5px solid transparent;
3035
clear: both;
3136
}
3237
33-
${p => p.step === 1 && `
38+
${p => p.step === 0 && `
3439
&::before {
3540
display: none;
3641
}

0 commit comments

Comments
 (0)