Skip to content

Commit 0b95757

Browse files
hannekeIan Wensink
authored andcommitted
fix(radio): limit width only for inline display
1 parent 87f1c3a commit 0b95757

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/RadioField/styled/radio-label.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default styled.label`
1010
'two_columns',
1111
'three_columns',
1212
].includes(p.optionDisplay) && `
13-
margin-right: calc(${p.theme.spacingUnit} / 1.5);
13+
margin-right: calc(${p.theme.spacingUnit} / 1);
1414
display: inline-block;
1515
width: auto;
1616
`}

src/RadioField/styled/wrapper.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ export default styled.div`
44
@media (min-width: 768px) {
55
display: inline-block;
66
float: left;
7-
width: calc(${p => p.theme.inlineLabelWidth} - (${p => p.theme.spacingUnit} / 2) - 0.5em);
87
}
98
9+
${p => p.labelDisplay === 'inline' && `
10+
width: calc(${p.theme.inlineLabelWidth} - (${p.theme.spacingUnit} / 2) - 0.5em);
11+
`}
12+
1013
${p => p.labelDisplay === 'before' && `
1114
float: none;
1215
width: 100%;

0 commit comments

Comments
 (0)