-
+
{header}
- {activePage}
- {footer}
- {modals}
+
+
+ {activePage}
+ {footer}
+ {modals}
+
);
}
export default Landing;
diff --git a/landing/mobile-nav.css b/landing/mobile-nav.css
index 2547b07aa..df9b04e3a 100644
--- a/landing/mobile-nav.css
+++ b/landing/mobile-nav.css
@@ -1,44 +1,52 @@
nav.mobileNav {
position: absolute;
top: -110vh;
bottom: auto;
left: 0;
right: 0;
height: 100vh;
z-index: 1;
background-color: var(--comparison-cards);
padding: 8px 16px 0;
+ transition: 500ms;
+ transition-property: top;
+}
+
+nav.activeMobileNav {
+ top: 0;
+ transition: 500ms;
+ transition-property: top;
}
div.tabContainer {
border-bottom: 1px solid var(--black-90);
-webkit-tap-highlight-color: transparent;
}
.tab {
color: var(--white-60);
transition: 150ms;
transition-property: color;
}
.activeTab {
color: var(--white-100);
}
.tabContent {
padding: 16px 0;
}
div.socialIconsContainer {
display: flex;
column-gap: 24px;
margin-top: 16px;
}
div.socialIconsContainer a {
-webkit-tap-highlight-color: transparent;
}
.icon {
color: var(--white-60);
}
diff --git a/landing/mobile-nav.react.js b/landing/mobile-nav.react.js
index 404e95e4c..b4e995ed5 100644
--- a/landing/mobile-nav.react.js
+++ b/landing/mobile-nav.react.js
@@ -1,59 +1,83 @@
// @flow
import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import classNames from 'classnames';
import * as React from 'react';
import { NavLink } from 'react-router-dom';
+import type { SetState } from 'lib/types/hook-types.js';
+
import css from './mobile-nav.css';
import typography from './typography.css';
-function MobileNav(): React.Node {
+type Props = {
+ +showMobileNav: boolean,
+ +setShowMobileNav: SetState
,
+};
+
+function MobileNav(props: Props): React.Node {
+ const { showMobileNav, setShowMobileNav } = props;
+
const navLinkClassName = classNames([typography.paragraph2, css.tab]);
+ const mobileNavClassName = classNames({
+ [css.mobileNav]: true,
+ [css.activeMobileNav]: showMobileNav,
+ });
+
+ const onClickTab = React.useCallback(() => {
+ setShowMobileNav(false);
+ }, [setShowMobileNav]);
+
return (
-