Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
fether
Commits
bedcce14
Commit
bedcce14
authored
Jan 18, 2019
by
Luke Schoen
Browse files
refactor: Rename to onItemClick
parent
e46e1f45
Changes
2
Hide whitespace changes
Inline
Side-by-side
packages/fether-react/src/Tokens/Tokens.js
View file @
bedcce14
...
...
@@ -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
'
/>
...
...
packages/fether-ui/src/MenuPopup/MenuPopup.js
View file @
bedcce14
...
...
@@ -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
=
{()
=>
handleGoToLin
k
(
item
.
url
)}
onClick
=
{()
=>
onItemClic
k
(
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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment