|
|
|
@ -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 './MenuItem.css';
|
|
|
|
|
|
|
|
|
@ -12,12 +13,17 @@ class MenuItem extends Component {
|
|
|
|
|
const {
|
|
|
|
|
className,
|
|
|
|
|
children,
|
|
|
|
|
isDisabled,
|
|
|
|
|
...otherProps
|
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Link
|
|
|
|
|
className={className}
|
|
|
|
|
className={classNames(
|
|
|
|
|
className,
|
|
|
|
|
isDisabled && styles.isDisabled
|
|
|
|
|
)}
|
|
|
|
|
isDisabled={isDisabled}
|
|
|
|
|
{...otherProps}
|
|
|
|
|
>
|
|
|
|
|
{children}
|
|
|
|
@ -28,11 +34,13 @@ class MenuItem extends Component {
|
|
|
|
|
|
|
|
|
|
MenuItem.propTypes = {
|
|
|
|
|
className: PropTypes.string,
|
|
|
|
|
children: PropTypes.node.isRequired
|
|
|
|
|
children: PropTypes.node.isRequired,
|
|
|
|
|
isDisabled: PropTypes.node.isRequired
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
MenuItem.defaultProps = {
|
|
|
|
|
className: styles.menuItem
|
|
|
|
|
className: styles.menuItem,
|
|
|
|
|
isDisabled: false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default MenuItem;
|
|
|
|
|