diff --git a/landing/global.css b/landing/global.css --- a/landing/global.css +++ b/landing/global.css @@ -1,4 +1,7 @@ :root { + --landing-page-z-index: 0; + --mobile-nav-z-index: 1; + --header-z-index: 2; --purple: #7e57c2; --white: #fff; --white1: #ebedee; diff --git a/landing/header.css b/landing/header.css --- a/landing/header.css +++ b/landing/header.css @@ -9,6 +9,15 @@ justify-content: space-between; padding: 18px 32px; width: 1850px; + z-index: var(--header-z-index); + background-color: transparent; + transition: 650ms; + transition-property: background-color; +} + +div.headerContainerMobileNavActive { + background-color: var(--comparison-cards); + transition: 250ms; } .logo { diff --git a/landing/header.react.js b/landing/header.react.js --- a/landing/header.react.js +++ b/landing/header.react.js @@ -7,20 +7,44 @@ import * as React from 'react'; import { NavLink } from 'react-router-dom'; +import type { SetState } from 'lib/types/hook-types.js'; + import css from './header.css'; import typography from './typography.css'; -function Header(): React.Node { +type Props = { + +showMobileNav: boolean, + +setShowMobileNav: SetState, +}; + +function Header(props: Props): React.Node { + const { showMobileNav, setShowMobileNav } = props; + + const headerContentContainerClassName = classNames({ + [css.headerNavContentContainer]: true, + [css.headerContainerMobileNavActive]: showMobileNav, + }); + const logoTextClassName = classNames([typography.heading2, css.logoText]); const badgeClassName = classNames([typography.paragraph2, css.betaBadge]); const navLinkClassName = classNames([typography.subheading2, css.tab]); + const onClickLogo = React.useCallback(() => { + setShowMobileNav(false); + }, [setShowMobileNav]); + + const onClickMobileNavIcon = React.useCallback(() => { + setShowMobileNav(!showMobileNav); + }, [setShowMobileNav, showMobileNav]); + return (