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.
41 lines
767 B
41 lines
767 B
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import { icons } from 'Helpers/Props';
|
|
import Menu from 'Components/Menu/Menu';
|
|
import ToolbarMenuButton from 'Components/Menu/ToolbarMenuButton';
|
|
|
|
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
|
|
};
|
|
|
|
SortMenu.defaultProps = {
|
|
isDisabled: false
|
|
};
|
|
|
|
export default SortMenu;
|