Skip to content

Commit

Permalink
fix: refactor menu, megamanu; removes deprecation warnings from tests (
Browse files Browse the repository at this point in the history
  • Loading branch information
haworku authored Jul 14, 2020
1 parent 0a23148 commit 42e2481
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/header/MegaMenu/MegaMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const MegaMenu = (
<div className="grid-row grid-gap-4">
{items.map((listItems, i) => (
<div className="usa-col" key={`subnav_col_${i}`}>
<NavList items={listItems} megamenu {...navListProps} />
<NavList items={listItems} type="megamenu" {...navListProps} />
</div>
))}
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/header/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ type MenuProps = {

export const Menu = (props: MenuProps & NavListProps): React.ReactElement => {
const { items, isOpen, ...navListProps } = props
return <NavList items={items} subnav hidden={!isOpen} {...navListProps} />
return (
<NavList items={items} type="subnav" hidden={!isOpen} {...navListProps} />
)
}

export default Menu

0 comments on commit 42e2481

Please sign in to comment.