Skip to content

Commit 181e832

Browse files
committed
💄 fix options styling
1 parent ad3db32 commit 181e832

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

client/components/mobile/Selector.jsx

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,34 @@ const PreferenceTitle = styled.h4.attrs(props => ({ ...props, className: 'prefer
88
color: ${prop('primaryTextColor')} !important;
99
`;
1010

11+
const Preference = styled.div.attrs(props => ({ ...props, className: 'preference' }))`
12+
flex-wrap: nowrap !important;
13+
align-items: baseline !important;
14+
justify-items: space-between
15+
`;
16+
17+
1118
const Selector = ({
1219
title, value, onSelect, options,
1320
}) => (
14-
<div className="preference">
15-
{/* <h4 className="preference__title">{title}</h4> */}
21+
<Preference>
1622
<PreferenceTitle>{title}</PreferenceTitle>
17-
{options.map(option => (
18-
<div className="preference__options" key={option.id}>
19-
<input
23+
<div className="preference__options">
24+
{options.map(option => (
25+
<React.Fragment><input
2026
type="radio"
2127
onChange={() => onSelect(option.value)}
2228
aria-label={option.ariaLabel}
2329
name={option.name}
30+
key={option.id}
2431
id={option.id}
2532
className="preference__radio-button"
2633
value={option.value}
2734
checked={value === option.value}
28-
/>
29-
<label htmlFor={option.id} className="preference__option">{option.label}</label>
30-
</div>))}
31-
</div>
35+
/><label htmlFor={option.id} className="preference__option">{option.label}</label>
36+
</React.Fragment>))}
37+
</div>
38+
</Preference>
3239
);
3340

3441
Selector.defaultProps = {

0 commit comments

Comments
 (0)