mirror of
https://github.com/Radarr/Radarr
synced 2025-12-31 04:34:36 +01:00
47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
import MenuContent from 'Components/Menu/MenuContent';
|
|
import SortMenu from 'Components/Menu/SortMenu';
|
|
import SortMenuItem from 'Components/Menu/SortMenuItem';
|
|
import { align } from 'Helpers/Props';
|
|
import { SortDirection } from 'Helpers/Props/sortDirections';
|
|
import translate from 'Utilities/String/translate';
|
|
|
|
interface MovieCollectionSortMenuProps {
|
|
sortKey?: string;
|
|
sortDirection?: SortDirection;
|
|
isDisabled: boolean;
|
|
onSortSelect(sortKey: string): void;
|
|
}
|
|
|
|
function MovieCollectionSortMenu({
|
|
sortKey,
|
|
sortDirection,
|
|
isDisabled,
|
|
onSortSelect,
|
|
}: MovieCollectionSortMenuProps) {
|
|
return (
|
|
<SortMenu isDisabled={isDisabled} alignMenu={align.RIGHT}>
|
|
<MenuContent>
|
|
<SortMenuItem
|
|
name="sortTitle"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Title')}
|
|
</SortMenuItem>
|
|
|
|
<SortMenuItem
|
|
name="missingMovies"
|
|
sortKey={sortKey}
|
|
sortDirection={sortDirection}
|
|
onPress={onSortSelect}
|
|
>
|
|
{translate('Missing')}
|
|
</SortMenuItem>
|
|
</MenuContent>
|
|
</SortMenu>
|
|
);
|
|
}
|
|
|
|
export default MovieCollectionSortMenu;
|