mirror of
https://github.com/wassname/talk.git
synced 2026-06-29 01:12:36 +08:00
13 lines
497 B
JavaScript
13 lines
497 B
JavaScript
import withSortOption from '../hocs/withSortOption';
|
|
import SortOption from '../components/SortOption';
|
|
|
|
/**
|
|
* A factory creating a sort option component.
|
|
* @param {string|function} label label to display, can be a callback for lazy evaluation.
|
|
* @param {Object} sort sort parameters
|
|
* @param {string} sort.sortBy
|
|
* @param {string} sort.sortOrder
|
|
* @return {Object} Component
|
|
*/
|
|
export const createSortOption = (label, sort) => withSortOption({...sort, label})(SortOption);
|