Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor menu, megamenu to use current props; removes deprecation warnings from tests #313

Merged
merged 3 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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