aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-11-29 16:33:06 +0800
committerEzekiel Aquino <ezekiel@bakkenbaeck.no>2018-11-29 16:33:06 +0800
commit03289293c3331735287346d9e1582474c2ee2f49 (patch)
tree1c736260042d2298c40388bf81fa843eb0cb5a41 /packages/website
parent0736ba7159f54d45ded79b55a976c96cbc3865e3 (diff)
downloaddexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar.gz
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar.bz2
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar.lz
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar.xz
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.tar.zst
dexon-sol-tools-03289293c3331735287346d9e1582474c2ee2f49.zip
Fixes interface syntax
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/@next/components/footer.tsx40
-rw-r--r--packages/website/ts/@next/components/layout.tsx30
2 files changed, 43 insertions, 27 deletions
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<LinkInterface>;
+ }
+}
+
+interface LinkListProps {
+ links: Array<LinkInterface>;
+}
+
+const linkRows: LinkRows = [
{
heading: 'Products',
links: [
@@ -65,15 +76,7 @@ export const Footer: React.StatelessComponent<FooterInterface> = ({}) => (
{ row.heading }
</RowHeading>
- <ul>
- {_.map(row.links, (link, index) => (
- <li key={`fl-${index}`}>
- <Link href={link.url}>
- { link.text }
- </Link>
- </li>
- ))}
- </ul>
+ <LinkList links={row.links} />
</Column>
))}
</Wrap>
@@ -82,6 +85,19 @@ export const Footer: React.StatelessComponent<FooterInterface> = ({}) => (
</FooterWrap>
);
+
+const LinkList = (props: LinkListProps) => (
+ <ul>
+ {_.map(props.links, (link, index) => (
+ <li key={`fl-${index}`}>
+ <Link href={link.url}>
+ { link.text }
+ </Link>
+ </li>
+ ))}
+ </ul>
+);
+
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;
}