mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
UI Action Handler Changes, Misc Fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user