0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 16:52:38 +00:00

set .sort-option to .active rather than button within.

This commit is contained in:
Gazook89
2022-09-19 11:06:33 -05:00
parent 8ac4d93581
commit 9fcc7b84c3

View File

@@ -114,11 +114,10 @@ const ListPage = createClass({
}, },
renderSortOption : function(sortTitle, sortValue){ renderSortOption : function(sortTitle, sortValue){
return <div className='sort-option'> return <div className={`sort-option ${(this.state.sortType == sortValue ? 'active' : '')}`}>
<button <button
value={`${sortValue}`} value={`${sortValue}`}
onClick={this.handleSortOptionChange} onClick={this.handleSortOptionChange}
className={`${(this.state.sortType == sortValue ? 'active' : '')}`}
> >
{`${sortTitle}`} {`${sortTitle}`}
</button> </button>