Some docs

This commit is contained in:
Chi Vinh Le
2017-08-25 21:22:48 +07:00
parent 42951aaf0b
commit e3227322a5
3 changed files with 22 additions and 0 deletions
@@ -18,6 +18,14 @@ const mapDispatchToProps = (dispatch) =>
dispatch
);
/**
* A HOC providing props to implement a sort option.
* Provides the props `active`, `setSort`, `label`.
* @param {Object} sort
* @param {Object} sort.sortBy
* @param {string} sort.sortOrder
* @return {Object} HOC
*/
export default ({sortBy = 'created_at', sortOrder = 'DESC', label}) => hoistStatics((WrappedComponent) => {
class WithSortOption extends React.Component {
setSort = () => {