Skip to content

Commit

Permalink
set defaultProps for MenuItem wrapped with HOC
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Apr 18, 2023
1 parent 59bcbd9 commit 3bcbdfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,11 @@ const MenuItem = (props) => {
MenuItem.propTypes = propTypes;
MenuItem.defaultProps = defaultProps;
MenuItem.displayName = 'MenuItem';
export default withWindowDimensions(React.forwardRef((props, ref) => (

const MenuItemWithWindowDimensions = withWindowDimensions(React.forwardRef((props, ref) => (
// eslint-disable-next-line react/jsx-props-no-spreading
<MenuItem {...props} forwardedRef={ref} />
)));
MenuItemWithWindowDimensions.defaultProps = defaultProps;

export default MenuItemWithWindowDimensions;

0 comments on commit 3bcbdfb

Please sign in to comment.