0
0
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:
Gazook89
2022-09-21 11:12:23 -05:00
parent 6329cb2cec
commit 3754468cf4
2 changed files with 3 additions and 2 deletions

View File

@@ -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>

View File

@@ -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;
} }