Skip to content

Commit

Permalink
Merge pull request #16 from newrelic/zstickles/suit-updates
Browse files Browse the repository at this point in the history
Use SUIT-style classnames for state
  • Loading branch information
zstix authored Apr 27, 2020
2 parents 405c586 + 4200e97 commit 28a48fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/HamburgerMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const HamburgerMenu = ({ toggle, open }) => (
aria-expanded={open}
aria-label="Mobile Menu"
type="button"
className={cx('HamburgerMenu', { HamburgerMenu__open: open })}
className={cx('HamburgerMenu', { 'is-open': open })}
onClick={() => toggle()}
>
<div />
Expand Down
2 changes: 1 addition & 1 deletion src/components/HamburgerMenu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ button.HamburgerMenu {
transition: 0.18s;
}

&.HamburgerMenu__open {
&.is-open {
:nth-child(1) {
transform: rotate(-45deg) translate(-6px, 6px);
}
Expand Down
4 changes: 1 addition & 3 deletions src/components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ const Header = ({ pages }) => {
`);

return (
<header
className={cx('Header--main', { 'Header--main__menuOpen': menuOpen })}
>
<header className={cx('Header--main', { 'is-open': menuOpen })}>
<Container>
<nav
role="navigation"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ header.Header--main {
}
}

&.Header--main__menuOpen nav {
&.is-open nav {
@media (max-width: 760px) {
background-color: var(--color-white);
display: block;
Expand Down

0 comments on commit 28a48fe

Please sign in to comment.