mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-08 05:51:47 -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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue