1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-03-05 15:15:59 +02:00

42 lines
831 B
JavaScript
Raw Normal View History

2018-01-12 18:01:27 -08:00
import PropTypes from 'prop-types';
import React from 'react';
import Menu from 'Components/Menu/Menu';
import ToolbarMenuButton from 'Components/Menu/ToolbarMenuButton';
import { align, icons } from 'Helpers/Props';
2018-01-12 18:01:27 -08:00
function SortMenu(props) {
const {
className,
children,
isDisabled,
...otherProps
} = props;
return (
<Menu
className={className}
{...otherProps}
>
<ToolbarMenuButton
iconName={icons.SORT}
text="Sort"
isDisabled={isDisabled}
/>
{children}
</Menu>
);
}
SortMenu.propTypes = {
className: PropTypes.string,
children: PropTypes.node.isRequired,
isDisabled: PropTypes.bool.isRequired,
alignMenu: PropTypes.oneOf([align.LEFT, align.RIGHT])
2018-01-12 18:01:27 -08:00
};
SortMenu.defaultProps = {
isDisabled: false
};
export default SortMenu;