mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 00:22:43 +00:00
change sortDir by clicking on sort title.
This commit is contained in:
@@ -117,7 +117,7 @@ const ListPage = createClass({
|
|||||||
return <div className={`sort-option ${(this.state.sortType == sortValue ? 'active' : '')}`}>
|
return <div className={`sort-option ${(this.state.sortType == sortValue ? 'active' : '')}`}>
|
||||||
<button
|
<button
|
||||||
value={`${sortValue}`}
|
value={`${sortValue}`}
|
||||||
onClick={this.handleSortOptionChange}
|
onClick={this.state.sortType == sortValue ? this.handleSortDirChange : this.handleSortOptionChange}
|
||||||
>
|
>
|
||||||
{`${sortTitle}`}
|
{`${sortTitle}`}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -69,10 +69,11 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #ddd;
|
color: #ddd;
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
height: 100%;
|
||||||
&.sortDir {
|
&.sortDir {
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user