Skip to content

Commit 87ff654

Browse files
authored
Merge pull request Gatheraa#388 from mijinummi/feat/event-sorting-control
Feat/event sorting control
2 parents 9bdeb44 + e0fd42a commit 87ff654

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from 'react';
2+
3+
export default function SortControl({ sortBy, onChange }) {
4+
return (
5+
<div className="flex items-center space-x-4">
6+
<label htmlFor="sort" className="text-sm font-medium text-gray-700">
7+
Sort by:
8+
</label>
9+
<select
10+
id="sort"
11+
value={sortBy}
12+
onChange={(e) => onChange(e.target.value)}
13+
className="rounded-md border-gray-300 shadow-sm focus:border-purple-500 focus:ring-purple-500 text-sm"
14+
>
15+
<option value="date">Date</option>
16+
<option value="popularity">Popularity</option>
17+
<option value="price">Price</option>
18+
</select>
19+
</div>
20+
);
21+
}

0 commit comments

Comments
 (0)