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
e46e1f45
Commit
e46e1f45
authored
Jan 18, 2019
by
Luke Schoen
Browse files
refactor: Pass down props to SUIPopup using otherProps
parent
402836f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/fether-ui/src/MenuPopup/MenuPopup.js
View file @
e46e1f45
...
...
@@ -8,34 +8,13 @@ import PropTypes from 'prop-types';
import
{
Popup
as
SUIPopup
}
from
'
semantic-ui-react
'
;
export
const
MenuPopup
=
({
basic
,
className
,
context
,
handleGoToLink
,
horizontalOffset
,
hoverable
,
menuItems
,
on
,
onClose
,
open
,
position
,
size
,
verticalOffset
...
otherProps
})
=>
(
<
SUIPopup
basic
=
{
basic
}
// toggles popup arrow
className
=
{
className
}
context
=
{
context
}
// element to bind the popup to or use position
horizontalOffset
=
{
horizontalOffset
}
hoverable
=
{
hoverable
}
// toggle autoclose
keepInViewPort
on
=
{
on
}
onClose
=
{(
event
,
data
)
=>
onClose
()}
open
=
{
open
}
position
=
{
position
}
size
=
{
size
}
verticalOffset
=
{
verticalOffset
}
>
<
SUIPopup
onClose
=
{(
event
,
data
)
=>
onClose
()}
open
=
{
open
}
{...
otherProps
}
>
<
div
className
=
'
popup-screen
'
>
<
SUIPopup
.
Content
>
{
menuItems
&&
...
...
@@ -63,12 +42,12 @@ MenuPopup.defaultProps = {
};
MenuPopup
.
propTypes
=
{
basic
:
PropTypes
.
bool
,
basic
:
PropTypes
.
bool
,
// toggles popup arrow
className
:
PropTypes
.
string
,
context
:
PropTypes
.
any
,
context
:
PropTypes
.
any
,
// element to bind the popup to or use position
handleGoToLink
:
PropTypes
.
func
,
horizontalOffset
:
PropTypes
.
number
,
hoverable
:
PropTypes
.
bool
,
hoverable
:
PropTypes
.
bool
,
// toggle autoclose
menuItems
:
PropTypes
.
array
.
isRequired
,
on
:
PropTypes
.
string
,
onClose
:
PropTypes
.
func
.
isRequired
,
...
...
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