You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
89 lines
2.0 KiB
89 lines
2.0 KiB
6 years ago
|
import PropTypes from 'prop-types';
|
||
|
import React from 'react';
|
||
|
import MenuContent from 'Components/Menu/MenuContent';
|
||
4 years ago
|
import SortMenu from 'Components/Menu/SortMenu';
|
||
6 years ago
|
import SortMenuItem from 'Components/Menu/SortMenuItem';
|
||
4 years ago
|
import { align, sortDirections } from 'Helpers/Props';
|
||
4 years ago
|
import translate from 'Utilities/String/translate';
|
||
6 years ago
|
|
||
3 years ago
|
function IndexerIndexSortMenu(props) {
|
||
6 years ago
|
const {
|
||
|
sortKey,
|
||
|
sortDirection,
|
||
|
isDisabled,
|
||
|
onSortSelect
|
||
|
} = props;
|
||
|
|
||
|
return (
|
||
|
<SortMenu
|
||
|
isDisabled={isDisabled}
|
||
|
alignMenu={align.RIGHT}
|
||
|
>
|
||
|
<MenuContent>
|
||
|
<SortMenuItem
|
||
|
name="status"
|
||
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
4 years ago
|
Status
|
||
6 years ago
|
</SortMenuItem>
|
||
|
|
||
|
<SortMenuItem
|
||
4 years ago
|
name="name"
|
||
6 years ago
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
4 years ago
|
{translate('Name')}
|
||
6 years ago
|
</SortMenuItem>
|
||
|
|
||
|
<SortMenuItem
|
||
|
name="added"
|
||
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
4 years ago
|
{translate('Added')}
|
||
6 years ago
|
</SortMenuItem>
|
||
|
|
||
4 years ago
|
<SortMenuItem
|
||
|
name="priority"
|
||
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
|
{'Priority'}
|
||
|
</SortMenuItem>
|
||
|
|
||
4 years ago
|
<SortMenuItem
|
||
4 years ago
|
name="protocol"
|
||
4 years ago
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
4 years ago
|
{'Protocol'}
|
||
4 years ago
|
</SortMenuItem>
|
||
|
|
||
|
<SortMenuItem
|
||
4 years ago
|
name="privacy"
|
||
4 years ago
|
sortKey={sortKey}
|
||
|
sortDirection={sortDirection}
|
||
|
onPress={onSortSelect}
|
||
|
>
|
||
4 years ago
|
{'Privacy'}
|
||
4 years ago
|
</SortMenuItem>
|
||
6 years ago
|
</MenuContent>
|
||
|
</SortMenu>
|
||
|
);
|
||
|
}
|
||
|
|
||
3 years ago
|
IndexerIndexSortMenu.propTypes = {
|
||
6 years ago
|
sortKey: PropTypes.string,
|
||
|
sortDirection: PropTypes.oneOf(sortDirections.all),
|
||
|
isDisabled: PropTypes.bool.isRequired,
|
||
|
onSortSelect: PropTypes.func.isRequired
|
||
|
};
|
||
|
|
||
3 years ago
|
export default IndexerIndexSortMenu;
|