From cb2b45bf043b4dd39f656be295c3823988b63a08 Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Tue, 11 Dec 2018 10:59:37 +0100 Subject: Loop through products dropdown data --- .../components/dropdowns/dropdown_products.tsx | 54 ++++++++++++---------- packages/website/ts/@next/components/header.tsx | 5 +- 2 files changed, 34 insertions(+), 25 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx b/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx index 366c00a1e..83d554f03 100644 --- a/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx +++ b/packages/website/ts/@next/components/dropdowns/dropdown_products.tsx @@ -1,34 +1,40 @@ +import * as _ from 'lodash'; import * as React from 'react'; import styled from 'styled-components'; import {Heading, Paragraph} from 'ts/@next/components/text'; +const navData = [ + { + title: '0x Instant', + description: 'Simple crypto purchasing', + url: '#', + }, + { + title: '0x Launch kit', + description: 'Build on the 0x protocol', + url: '#', + }, + { + title: 'Extensions', + url: '#', + }, +]; + export const DropdownProducts = () => ( -
  • - - 0x Instant - - - - Simple crypto purchasing - -
  • - -
  • - - 0x Launch Kit - - - - Build on the 0x protocol - -
  • + {_.map(navData, (item, index) => ( +
  • + + {item.title} + -
  • - - Extensions - -
  • + {item.description && + + {item.description} + + } + + ))}
    ); diff --git a/packages/website/ts/@next/components/header.tsx b/packages/website/ts/@next/components/header.tsx index 474d36086..4b5f8d346 100644 --- a/packages/website/ts/@next/components/header.tsx +++ b/packages/website/ts/@next/components/header.tsx @@ -92,9 +92,11 @@ export class Header extends React.Component { } public render(): React.ReactNode { + const { isOpen } = this.state; + return ( - + @@ -131,6 +133,7 @@ export class Header extends React.Component { const StyledHeader = styled(Section.withComponent('header'))` @media (max-width: 768px) { min-height: ${props => props.isOpen ? '385px' : '70px'}; + overflow: ${props => !props.isOpen && 'hidden'}; position: relative; transition: min-height 0.25s ease-in-out; } -- cgit v1.2.3