diff --git a/packages/gatsby-theme-carbon/src/components/Header/Header.module.scss b/packages/gatsby-theme-carbon/src/components/Header/Header.module.scss index 541a01cbb..6b81762a4 100644 --- a/packages/gatsby-theme-carbon/src/components/Header/Header.module.scss +++ b/packages/gatsby-theme-carbon/src/components/Header/Header.module.scss @@ -1,6 +1,15 @@ @import '~carbon-components/scss/globals/scss/vars'; @import '~carbon-components/scss/globals/scss/layout'; +header.header button { + display: flex; + justify-content: center; + align-items: center; + svg { + margin-top: 0; + } +} + header.header { transition: top $duration--fast-02; background-color: $ui-05; @@ -12,6 +21,8 @@ header.header { top: -48px; } -.icon svg { - margin-top: 2px; +button.icon { + display: flex; + justify-content: center; + align-items: center; } diff --git a/packages/gatsby-theme-carbon/src/components/Switcher/Switcher.js b/packages/gatsby-theme-carbon/src/components/Switcher/Switcher.js index 5ea23ae6c..711fa07b2 100644 --- a/packages/gatsby-theme-carbon/src/components/Switcher/Switcher.js +++ b/packages/gatsby-theme-carbon/src/components/Switcher/Switcher.js @@ -1,16 +1,10 @@ import React, { useContext } from 'react'; import cx from 'classnames'; import NavContext from '../../util/context/NavContext'; -import { useScrollDirection } from '../../util/hooks'; import { nav, open, divider, link, linkDisabled } from './Switcher.module.scss'; const Switcher = ({ children }) => { - const { switcherIsOpen, toggleNavState } = useContext(NavContext); - const direction = useScrollDirection(); - - if (direction === 'down' && switcherIsOpen) { - toggleNavState('switcherIsOpen', 'close'); - } + const { switcherIsOpen } = useContext(NavContext); return (