mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 09:33:52 -07:00
UI Action Handler Changes, Misc Fixes
This commit is contained in:
parent
7825319d89
commit
cd5b658196
193 changed files with 6992 additions and 6341 deletions
|
@ -9,6 +9,7 @@ function FilterMenu(props) {
|
|||
const {
|
||||
className,
|
||||
children,
|
||||
isDisabled,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
|
@ -20,6 +21,7 @@ function FilterMenu(props) {
|
|||
<ToolbarMenuButton
|
||||
iconName={icons.FILTER}
|
||||
text="Filter"
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
{children}
|
||||
</Menu>
|
||||
|
@ -28,11 +30,13 @@ function FilterMenu(props) {
|
|||
|
||||
FilterMenu.propTypes = {
|
||||
className: PropTypes.string,
|
||||
children: PropTypes.node.isRequired
|
||||
children: PropTypes.node.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
FilterMenu.defaultProps = {
|
||||
className: styles.filterMenu
|
||||
className: styles.filterMenu,
|
||||
isDisabled: false
|
||||
};
|
||||
|
||||
export default FilterMenu;
|
||||
|
|
|
@ -13,3 +13,7 @@
|
|||
color: $toobarButtonHoverColor;
|
||||
}
|
||||
}
|
||||
|
||||
.isDisabled {
|
||||
color: $disabledColor;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
import classNames from 'classnames';
|
||||
import Link from 'Components/Link/Link';
|
||||
import styles from './MenuButton.css';
|
||||
|
||||
|
@ -12,13 +13,18 @@ class MenuButton extends Component {
|
|||
const {
|
||||
className,
|
||||
children,
|
||||
isDisabled,
|
||||
onPress,
|
||||
...otherProps
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
<Link
|
||||
className={className}
|
||||
className={classNames(
|
||||
className,
|
||||
isDisabled && styles.isDisabled
|
||||
)}
|
||||
isDisabled={isDisabled}
|
||||
onPress={onPress}
|
||||
{...otherProps}
|
||||
>
|
||||
|
@ -31,11 +37,13 @@ class MenuButton extends Component {
|
|||
MenuButton.propTypes = {
|
||||
className: PropTypes.string,
|
||||
children: PropTypes.node.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired,
|
||||
onPress: PropTypes.func
|
||||
};
|
||||
|
||||
MenuButton.defaultProps = {
|
||||
className: styles.menuButton
|
||||
className: styles.menuButton,
|
||||
isDisabled: false
|
||||
};
|
||||
|
||||
export default MenuButton;
|
||||
|
|
|
@ -8,6 +8,7 @@ function SortMenu(props) {
|
|||
const {
|
||||
className,
|
||||
children,
|
||||
isDisabled,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
|
@ -19,6 +20,7 @@ function SortMenu(props) {
|
|||
<ToolbarMenuButton
|
||||
iconName={icons.SORT}
|
||||
text="Sort"
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
{children}
|
||||
</Menu>
|
||||
|
@ -27,7 +29,12 @@ function SortMenu(props) {
|
|||
|
||||
SortMenu.propTypes = {
|
||||
className: PropTypes.string,
|
||||
children: PropTypes.node.isRequired
|
||||
children: PropTypes.node.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
SortMenu.defaultProps = {
|
||||
isDisabled: false
|
||||
};
|
||||
|
||||
export default SortMenu;
|
||||
|
|
|
@ -7,6 +7,7 @@ import ToolbarMenuButton from 'Components/Menu/ToolbarMenuButton';
|
|||
function ViewMenu(props) {
|
||||
const {
|
||||
children,
|
||||
isDisabled,
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
|
@ -17,6 +18,7 @@ function ViewMenu(props) {
|
|||
<ToolbarMenuButton
|
||||
iconName={icons.VIEW}
|
||||
text="View"
|
||||
isDisabled={isDisabled}
|
||||
/>
|
||||
{children}
|
||||
</Menu>
|
||||
|
@ -24,7 +26,12 @@ function ViewMenu(props) {
|
|||
}
|
||||
|
||||
ViewMenu.propTypes = {
|
||||
children: PropTypes.node.isRequired
|
||||
children: PropTypes.node.isRequired,
|
||||
isDisabled: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
ViewMenu.defaultProps = {
|
||||
isDisabled: false
|
||||
};
|
||||
|
||||
export default ViewMenu;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue