From 03289293c3331735287346d9e1582474c2ee2f49 Mon Sep 17 00:00:00 2001 From: Ezekiel Aquino Date: Thu, 29 Nov 2018 09:33:06 +0100 Subject: Fixes interface syntax --- packages/website/ts/@next/components/footer.tsx | 40 +++++++++++++++++-------- packages/website/ts/@next/components/layout.tsx | 30 +++++++++---------- 2 files changed, 43 insertions(+), 27 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/@next/components/footer.tsx b/packages/website/ts/@next/components/footer.tsx index aff5c13c4..be5c075f9 100644 --- a/packages/website/ts/@next/components/footer.tsx +++ b/packages/website/ts/@next/components/footer.tsx @@ -8,16 +8,27 @@ import { Button } from './button'; import { Section, Wrap, Column } from './layout'; import { Logo } from './logo'; -export interface FooterInterface { +interface FooterInterface { } -export interface LinkInterface { +interface LinkInterface { text: string; url: string; newWindow?: boolean; } -const linkRows = [ +interface LinkRows { + [key: string]: { + heading: string; + links: Array; + } +} + +interface LinkListProps { + links: Array; +} + +const linkRows: LinkRows = [ { heading: 'Products', links: [ @@ -65,15 +76,7 @@ export const Footer: React.StatelessComponent = ({}) => ( { row.heading } -
    - {_.map(row.links, (link, index) => ( -
  • - - { link.text } - -
  • - ))} -
+ ))} @@ -82,6 +85,19 @@ export const Footer: React.StatelessComponent = ({}) => ( ); + +const LinkList = (props: LinkListProps) => ( +
    + {_.map(props.links, (link, index) => ( +
  • + + { link.text } + +
  • + ))} +
+); + const FooterWrap = Section.withComponent('footer'); const RowHeading = styled.h3` diff --git a/packages/website/ts/@next/components/layout.tsx b/packages/website/ts/@next/components/layout.tsx index edf739229..c25981ed6 100644 --- a/packages/website/ts/@next/components/layout.tsx +++ b/packages/website/ts/@next/components/layout.tsx @@ -2,36 +2,36 @@ import * as React from 'react'; import styled from 'styled-components'; interface WrapWidths { - default: string, - full: string, - medium: string, - narrow: string, - [key: string]: string, + default: string; + full: string; + medium: string; + narrow: string; + [key: string]: string; } interface ColumnWidths { - [key: string]: string, + [key: string]: string; } interface SectionProps { - noPadding?: any, - noMargin?: any, - bgColor?: string, + noPadding?: any; + noMargin?: any; + bgColor?: string; } interface WrapProps { - width?: 'default' | 'full' | 'medium' | 'narrow', - bgColor?: string, + width?: 'default' | 'full' | 'medium' | 'narrow'; + bgColor?: string; } interface ColumnProps { - colWidth?: '1/4' | '1/3' | '1/2' | '2/3', - noPadding?: any, + colWidth?: '1/4' | '1/3' | '1/2' | '2/3'; + noPadding?: any; } interface GetColWidthArgs { - span?: number, - columns: number, + span?: number; + columns: number; } -- cgit v1.2.3