Skip to content

Commit

Permalink
fix: fix margins for select elems
Browse files Browse the repository at this point in the history
  • Loading branch information
roadlittledawn committed Jun 7, 2021
1 parent 3e1fd5a commit 235a30b
Showing 1 changed file with 37 additions and 48 deletions.
85 changes: 37 additions & 48 deletions src/pages/observability-packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,52 +139,39 @@ const ObservabilityPacksPage = ({ data, location }) => {
}
`}
>
<div
css={css`
margin: 0 0.5rem;
`}
>
<FormControl>
<Label htmlFor="sortFilter">Sort by</Label>
<Select
id="sortFilter"
value={sortState}
onChange={(e) => {
setSortState(e.target.value);
}}
>
{sortOptionValues.map((sortOption) => (
<option key={sortOption} value={sortOption}>
{sortOption}
</option>
))}
</Select>
</FormControl>
</div>
<div
css={css`
margin: 0 0.5rem;
`}
>
<FormControl>
<Label htmlFor="packContentsFilter">
Filter packs containing
</Label>
<Select
id="packContentsFilter"
value={containingFilterState}
onChange={(e) => {
setContainingFilterState(e.target.value);
}}
>
{packContentsFilterValues.map((packContentsItem) => (
<option key={packContentsItem} value={packContentsItem}>
{packContentsItem}
</option>
))}
</Select>
</FormControl>
</div>
<FormControl>
<Label htmlFor="sortFilter">Sort by</Label>
<Select
id="sortFilter"
value={sortState}
onChange={(e) => {
setSortState(e.target.value);
}}
>
{sortOptionValues.map((sortOption) => (
<option key={sortOption} value={sortOption}>
{sortOption}
</option>
))}
</Select>
</FormControl>

<FormControl>
<Label htmlFor="packContentsFilter">Filter packs containing</Label>
<Select
id="packContentsFilter"
value={containingFilterState}
onChange={(e) => {
setContainingFilterState(e.target.value);
}}
>
{packContentsFilterValues.map((packContentsItem) => (
<option key={packContentsItem} value={packContentsItem}>
{packContentsItem}
</option>
))}
</Select>
</FormControl>
</div>
<div>
<Button variant={Button.VARIANT.PRIMARY}>Grid view</Button>
Expand Down Expand Up @@ -274,8 +261,10 @@ Label.propTypes = {
const FormControl = ({ children }) => (
<div
css={css`
&:not(:last-child) {
margin-bottom: 1.5rem;
margin: 0 0.5rem;
@media screen and (max-width: 1180px) {
margin: 0.5rem 0;
}
`}
>
Expand Down

0 comments on commit 235a30b

Please sign in to comment.