Skip to content

Commit

Permalink
Set up subnav-button for Component Testing exercise
Browse files Browse the repository at this point in the history
  • Loading branch information
marcysutton committed May 24, 2022
1 parent 997dab1 commit 67d6c50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/meganav/meganav-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const MegaNavSection = React.forwardRef((props, ref) => {
`}
>
<SubNavButton
aria-expanded={props.activeMenu === ref}
buttonName={props.buttonName}
className="megamenu-navitem header-main-item"
idRef={props.id}
Expand Down
4 changes: 2 additions & 2 deletions components/meganav/subnav-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import PropTypes from 'prop-types'

const SubNavButton = React.forwardRef((props, ref) => (
<h2>
<div
<button
className="megamenu-navitem header-main-item"
id={props.idRef}
data-testid={props.idRef}
onClick={(event) => { props.onClick(event) }}
ref={ref}
>
{props.buttonName}
</div>
</button>
</h2>
))

Expand Down

0 comments on commit 67d6c50

Please sign in to comment.