mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 04:52:21 -07:00
(cherry picked from commit d022679b7dcbce3cec98e6a1fd0879e3c0d92523) Fixed: Restoring scroll position when going back/forward to artist list (cherry picked from commit 5aad84dba453c42b4b5a9eac43deecf91a98f4f6)
38 lines
757 B
JavaScript
38 lines
757 B
JavaScript
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';
|
|
|
|
function ViewMenu(props) {
|
|
const {
|
|
children,
|
|
isDisabled,
|
|
...otherProps
|
|
} = props;
|
|
|
|
return (
|
|
<Menu
|
|
{...otherProps}
|
|
>
|
|
<ToolbarMenuButton
|
|
iconName={icons.VIEW}
|
|
text="View"
|
|
isDisabled={isDisabled}
|
|
/>
|
|
{children}
|
|
</Menu>
|
|
);
|
|
}
|
|
|
|
ViewMenu.propTypes = {
|
|
children: PropTypes.node.isRequired,
|
|
isDisabled: PropTypes.bool.isRequired,
|
|
alignMenu: PropTypes.oneOf([align.LEFT, align.RIGHT])
|
|
};
|
|
|
|
ViewMenu.defaultProps = {
|
|
isDisabled: false
|
|
};
|
|
|
|
export default ViewMenu;
|