Skip to content

Commit

Permalink
Added nested dropdown list for burger menu (#670)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidQuartz authored Dec 16, 2021
1 parent 3c7b87e commit 606fedf
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ const itemElement = ({ labelId, href, badge, target }) => (
</NavLink>
</>);

const itemsList = (items) => ( items && items.map(({ labelId, href, badge, target }) => itemElement({ labelId, href, badge, target })));
const itemsList = (items) => (items && items.map((item) => {

const { labelId, href, badge, target, type, Component, className } = item;

if (type === 'plugin' && Component) {
return (<li><Component variant="default" className={className} showMessage /></li>);
}

return itemElement({ labelId, href, badge, target });
} ));

/**
* DropdownList component
Expand Down

0 comments on commit 606fedf

Please sign in to comment.