Commit bedcce14 authored by Luke Schoen's avatar Luke Schoen
Browse files

refactor: Rename to onItemClick

parent e46e1f45
......@@ -74,10 +74,10 @@ class Tokens extends PureComponent {
<MenuPopup
className='popup-menu-account'
context={menuNode}
handleGoToLink={this.handleGoToLink}
horizontalOffset={1}
menuItems={this.menuItems()}
onClose={this.handleToggleMenu}
onItemClick={this.handleGoToLink}
open={isMenuOpen}
size='small'
/>
......
......@@ -8,9 +8,9 @@ import PropTypes from 'prop-types';
import { Popup as SUIPopup } from 'semantic-ui-react';
export const MenuPopup = ({
handleGoToLink,
menuItems,
onClose,
onItemClick,
open,
...otherProps
}) => (
......@@ -22,7 +22,7 @@ export const MenuPopup = ({
<div
className='popup-screen_item'
key={item.name}
onClick={() => handleGoToLink(item.url)}
onClick={() => onItemClick(item.url)}
>
{item.name}
</div>
......@@ -45,12 +45,12 @@ MenuPopup.propTypes = {
basic: PropTypes.bool, // toggles popup arrow
className: PropTypes.string,
context: PropTypes.any, // element to bind the popup to or use position
handleGoToLink: PropTypes.func,
horizontalOffset: PropTypes.number,
hoverable: PropTypes.bool, // toggle autoclose
menuItems: PropTypes.array.isRequired,
on: PropTypes.string,
onClose: PropTypes.func.isRequired,
onItemClick: PropTypes.func,
open: PropTypes.bool.isRequired,
position: PropTypes.string,
size: PropTypes.string,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment