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