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

Use SUIT-style classnames for state #16

Merged
merged 1 commit into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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/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