Skip to content

Commit

Permalink
fix(selected facets): group text and range facets under a common cont…
Browse files Browse the repository at this point in the history
…ainer
  • Loading branch information
sanjithkumar017 committed May 22, 2021
1 parent a4b0e33 commit 31e379a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 28 deletions.
14 changes: 6 additions & 8 deletions public/css/theme/modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@
.UNX-productCard__container {
display: flex;
flex-direction: row;

.UNX-product-card {
flex: 0.4;
}
.-details {
flex: 0.6;
min-width: 0;
}
}
}
}
Expand Down Expand Up @@ -526,6 +518,12 @@
display: flex;
align-items: baseline;

.UNX-selectedTextFacets__list,
.UNX-selectedRangeFacets__list {
display: flex;
align-items: baseline;
}

.-label {
color: #333;
font-size: 15px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,27 @@ Array [
className="UNX-selectedFacets__list"
>
<div
className="UNX-selectedFacets__item"
data-facet-name="price"
data-id="[200-300]"
onClick={[Function]}
role="button"
tabIndex={0}
className="UNX-selectedRangeFacets__list"
>
<span>
$
200
-
$
300
</span>
x
<div
className="UNX-selectedFacets__item"
data-facet-name="price"
data-id="[200-300]"
onClick={[Function]}
role="button"
tabIndex={0}
>
<span>
$
200
-
$
300
</span>
x
</div>
</div>
</div>
</div>,
Expand Down
10 changes: 6 additions & 4 deletions src/modules/selectedFacets/SelectedFacetsWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const SelectedFacetsWrapper = (props) => {
ListItem={facetItemComponent || FacetItem}
idAttribute="dataId"
onClick={onTextFacetClick}
className="UNX-selectedFacets__list"
className="UNX-selectedTextFacets__list"
/>
);
}
Expand All @@ -38,7 +38,7 @@ const SelectedFacetsWrapper = (props) => {
ListItem={facetItemComponent || FacetItem}
idAttribute="facetName"
onClick={onRangeFacetClick}
className="UNX-selectedFacets__list"
className="UNX-selectedRangeFacets__list"
priceUnit={priceUnit}
/>
);
Expand All @@ -54,8 +54,10 @@ const SelectedFacetsWrapper = (props) => {
return (
<div className="UNX-selectedFacets__container">
{label || null}
{activeTextFacetsMarkup}
{activeRangeFacetsMarkup}
<div className="UNX-selectedFacets__list">
{activeTextFacetsMarkup}
{activeRangeFacetsMarkup}
</div>
</div>
);
};
Expand Down

0 comments on commit 31e379a

Please sign in to comment.