Skip to content

Commit a65c0cb

Browse files
hannekeIan Wensink
authored andcommitted
fix(theme-settings): use inlineLabelWidth setting instead of hardcoded values
1 parent eca30f4 commit a65c0cb

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Date/styled/wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default styled.div`
1818
padding-right: 20px;
1919
2020
@media (min-width: 768px) {
21-
width: calc(50% + ${p.theme.inputWidth} + 20px);
21+
width: calc(${p.theme.inlineLabelWidth} + ${p.theme.inputWidth} + 20px);
2222
}
2323
`}
2424
`;

src/Input/styled/wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ export default styled.div`
44
display: inline-block;
55
66
${p => p.labelDisplay === 'inline' && `
7-
// width: ${p.theme.inputWidth};
7+
width: ${p.theme.inputWidth};
88
`}
99
1010
${p => p.labelDisplay === 'before' && `
1111
width: ${p.theme.inputWidth};
1212
1313
@media (min-width: 768px) {
14-
width: calc(50% + ${p.theme.inputWidth});
14+
width: calc(${p.theme.inlineLabelWidth} + ${p.theme.inputWidth});
1515
}
1616
`}
1717
`;

src/RadioField/styled/wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default styled.div`
44
@media (min-width: 768px) {
55
display: inline-block;
66
float: left;
7-
width: calc(50% - (${p => p.theme.spacingUnit} / 2) - 0.5em);
7+
width: calc(${p => p.theme.inlineLabelWidth} - (${p => p.theme.spacingUnit} / 2) - 0.5em);
88
}
99
1010
${p => p.labelDisplay === 'before' && `

src/RangeField/styled/wrapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default styled.div`
2323
padding-right: 20px;
2424
2525
@media (min-width: 768px) {
26-
width: calc(50% + ${p.theme.inputWidth} + 20px);
26+
width: calc(${p.theme.inlineLabelWidth} + ${p.theme.inputWidth} + 20px);
2727
}
2828
`}
2929
`;

0 commit comments

Comments
 (0)