Skip to content

Commit

Permalink
Use name of attribute only when value is true
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Hobson committed Jun 30, 2020
1 parent 7061c83 commit 2ad58e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 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={true} {...navListProps} />
<NavList items={listItems} megamenu {...navListProps} />
</div>
))}
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/components/header/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ type MenuProps = {

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

export default Menu

0 comments on commit 2ad58e8

Please sign in to comment.