Skip to content

Commit b682b9c

Browse files
committed
Fix: Select component styling
Fixes #217
1 parent 067f498 commit b682b9c

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

__tests__/shared/components/__snapshots__/Select.jsx.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ exports[`Matches shallow shapshot 1`] = `
44
<Select
55
addLabelText="Add \\"{label}\\"?"
66
arrowRenderer={[Function]}
7-
autosize={true}
7+
autosize={false}
88
backspaceRemoves={true}
99
backspaceToRemoveMessage="Press backspace to remove {label}"
10+
className="src-shared-components-Select-___style__select___oXBnl"
1011
clearAllText="Clear all"
1112
clearRenderer={[Function]}
1213
clearValueText="Clear value"

src/shared/components/Select.jsx renamed to src/shared/components/Select/index.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@ import PT from 'prop-types';
33

44
import ReactSelect from 'react-select';
55
import 'react-select/dist/react-select.css';
6+
import style from './style.scss';
67

78
/* TODO: Do we really need the instanceId? */
89
export default function Select(props) {
910
return (
10-
<ReactSelect {...props} instanceId={props.id} />
11+
<ReactSelect
12+
{...props}
13+
autosize={false}
14+
className={style.select}
15+
instanceId={props.id}
16+
/>
1117
);
1218
}
1319

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.select {
2+
:global {
3+
input.Select-input {
4+
margin-left: 0 !important;
5+
padding-right: 6px !important;
6+
}
7+
8+
.Select-multi-value-wrapper {
9+
width: 100% !important;
10+
}
11+
}
12+
}

src/shared/components/challenge-listing/Filters/FiltersPanel/style.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ $panel-radius-4: $corner-radius * 2;
365365

366366
input {
367367
font-size: 15px;
368-
padding: 0;
369368
}
370369
}
371370

0 commit comments

Comments
 (0)