Commit 402836f7 authored by Luke Schoen's avatar Luke Schoen
Browse files

refactor: Replace with defaultProps

parent 04f762fd
......@@ -23,18 +23,18 @@ export const MenuPopup = ({
verticalOffset
}) => (
<SUIPopup
basic={basic || true} // toggles popup arrow
basic={basic} // toggles popup arrow
className={className}
context={context} // element to bind the popup to or use position
horizontalOffset={horizontalOffset || 0}
horizontalOffset={horizontalOffset}
hoverable={hoverable} // toggle autoclose
keepInViewPort
on={on || 'click'}
on={on}
onClose={(event, data) => onClose()}
open={open}
position={position || 'top right'}
size={size || 'large'}
verticalOffset={verticalOffset || 0}
position={position}
size={size}
verticalOffset={verticalOffset}
>
<div className='popup-screen'>
<SUIPopup.Content>
......@@ -53,6 +53,15 @@ export const MenuPopup = ({
</SUIPopup>
);
MenuPopup.defaultProps = {
basic: true,
horizontalOffset: 0,
on: 'click',
position: 'top right',
size: 'large',
verticalOffset: 0
};
MenuPopup.propTypes = {
basic: PropTypes.bool,
className: 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