Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix custom styles in filters
Krzysztof Białogłowicz8e27b2957de6
diff --git a/saleor/static/js/components/PriceFilter.js b/saleor/static/js/components/PriceFilter.jsindex cfa44e2a5f..6aedb47cdd 100644--- a/saleor/static/js/components/PriceFilter.js+++ b/saleor/static/js/components/PriceFilter.js@@ -46,24 +46,29 @@ export default class PriceFilter extends Component {render() {return (- <div>- <input- name="minPrice"- onChange={this.onChange}- onKeyUp={this.checkKey}- placeholder="min"- type="number"- value={this.state.minPrice}- />- <input- name="maxPrice"- onChange={this.onChange}- onKeyUp={this.checkKey}- placeholder="max"- type="number"- value={this.state.maxPrice}- />- <button onClick={this.updateFilter}>Update</button>+ <div className="price-range">+ <input+ id="minPrice"+ className="form-control"+ name="minPrice"+ onChange={this.onChange}+ onKeyUp={this.checkKey}+ placeholder="min"+ type="number"+ value={this.state.minPrice}+ />+ <span>—</span>+ <input+ id="maxPrice"+ name="maxPrice"+ className="form-control"+ onChange={this.onChange}+ onKeyUp={this.checkKey}+ placeholder="max"+ type="number"+ value={this.state.maxPrice}+ />+ <button className="btn" onClick={this.updateFilter}>Update</button></div>);}diff --git a/saleor/static/js/components/ProductList.js b/saleor/static/js/components/ProductList.jsindex 44b2504a19..8c163a6e93 100644--- a/saleor/static/js/components/ProductList.js+++ b/saleor/static/js/components/ProductList.js@@ -22,9 +22,9 @@ class ProductList extends Component {<ProductItem key={i} product={edge.node} />)))}</div>- <div>+ <div className="load-more">{hasNextPage && (- <button onClick={this.onLoadMore}>Load more</button>+ <button className="btn" onClick={this.onLoadMore}>Load more</button>)}</div></div>diff --git a/saleor/static/scss/demo/components/_category-page.scss b/saleor/static/scss/demo/components/_category-page.scssnew file mode 100644index 0000000000..48c1b03f52--- /dev/null+++ b/saleor/static/scss/demo/components/_category-page.scss@@ -0,0 +1,50 @@+.product-filters {+ h3 {+ padding-bottom: $global-padding;+ }+ ul {+ padding: $global-padding/2 0;+ }+ .item {+ min-width: 4rem;+ background: $white;+ border-radius: 1rem;+ border: solid 1px $gray;+ padding: $global-padding/2;+ margin: 0 $global-margin/2;+ outline: 0;+ cursor: pointer;+ &.active {+ background: $gray;+ }+ }+ .price-range {+ input {+ width: 7.6rem;+ display: inline-block;+ }+ span {+ margin: 0 $global-margin;+ }+ button {+ width: 18rem;+ margin-top: $global-margin;+ }+ }+}++.load-more {+ clear: both;+ button {+ width: 20rem;+ margin: 0 auto;+ display: block;+ color: $white;+ font-size: 2rem;+ cursor: pointer;+ outline: 0;+ &:hover {+ background: darken($gray, 10%);+ }+ }+}\ No newline at end of filediff --git a/saleor/static/scss/storefront/storefront.scss b/saleor/static/scss/storefront/storefront.scssindex ec293fb19d..ddd6a31663 100644--- a/saleor/static/scss/storefront/storefront.scss+++ b/saleor/static/scss/storefront/storefront.scss@@ -18,3 +18,4 @@@import "components/product-list";@import "components/checkout";@import "components/order-details";+@import "components/category-page";\ No newline at end of file