mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed: Season actions on mobile not indicating when they are disabled
This commit is contained in:
parent
341773830b
commit
1da20da3ff
@ -1,6 +1,5 @@
|
|||||||
.menuItem {
|
.menuItem {
|
||||||
@add-mixin truncate;
|
@add-mixin truncate;
|
||||||
|
|
||||||
display: block;
|
display: block;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
@ -17,3 +16,8 @@
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.isDisabled {
|
||||||
|
color: $disabledColor;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
import classNames from 'classnames';
|
||||||
import Link from 'Components/Link/Link';
|
import Link from 'Components/Link/Link';
|
||||||
import styles from './MenuItem.css';
|
import styles from './MenuItem.css';
|
||||||
|
|
||||||
@ -12,12 +13,17 @@ class MenuItem extends Component {
|
|||||||
const {
|
const {
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
|
isDisabled,
|
||||||
...otherProps
|
...otherProps
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
className={className}
|
className={classNames(
|
||||||
|
className,
|
||||||
|
isDisabled && styles.isDisabled
|
||||||
|
)}
|
||||||
|
isDisabled={isDisabled}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@ -28,11 +34,13 @@ class MenuItem extends Component {
|
|||||||
|
|
||||||
MenuItem.propTypes = {
|
MenuItem.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
children: PropTypes.node.isRequired
|
children: PropTypes.node.isRequired,
|
||||||
|
isDisabled: PropTypes.node.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
MenuItem.defaultProps = {
|
MenuItem.defaultProps = {
|
||||||
className: styles.menuItem
|
className: styles.menuItem,
|
||||||
|
isDisabled: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export default MenuItem;
|
export default MenuItem;
|
||||||
|
Loading…
Reference in New Issue
Block a user