Fixed small errors
This commit is contained in:
committed by
fabioberger
parent
70b797cb6d
commit
d012268953
@@ -1,30 +1,17 @@
|
|||||||
import { Link } from '@0x/react-shared';
|
import React from 'react';
|
||||||
import * as _ from 'lodash';
|
import styled from 'styled-components';
|
||||||
import * as React from 'react';
|
|
||||||
import styled, { withTheme } from 'styled-components';
|
|
||||||
|
|
||||||
import { Button } from 'ts/components/button';
|
|
||||||
import { SearchInput } from 'ts/components/docs/search_input';
|
|
||||||
import { Icon } from 'ts/components/icon';
|
|
||||||
import { Column, FlexWrap, WrapGrid } from 'ts/components/newLayout';
|
|
||||||
import { ThemeValuesInterface } from 'ts/components/siteWrap';
|
|
||||||
import { Heading, Paragraph } from 'ts/components/text';
|
|
||||||
import { colors } from 'ts/style/colors';
|
import { colors } from 'ts/style/colors';
|
||||||
import { WebsitePaths } from 'ts/types';
|
|
||||||
import { constants } from 'ts/utils/constants';
|
|
||||||
|
|
||||||
export interface StepLinkConfig {
|
export interface IStepLinkConfig {
|
||||||
title: string;
|
title: string;
|
||||||
url: string;
|
url: string;
|
||||||
shouldOpenInNewTab?: boolean;
|
shouldOpenInNewTab?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface WrapperProps {}
|
export const StepLink: React.FC<IStepLinkConfig> = props => (
|
||||||
|
<StepLinkWrapper href={props.url}>
|
||||||
export const StepLink: React.FunctionComponent<StepLinkConfig> = (props: StepLinkConfig) => (
|
<StepLinkText>{props.title}</StepLinkText>
|
||||||
<>
|
|
||||||
<Wrapper href={props.url}>
|
|
||||||
<Text>{props.title}</Text>
|
|
||||||
<svg width="14" height="14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="14" height="14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
fillRule="evenodd"
|
fillRule="evenodd"
|
||||||
@@ -33,11 +20,10 @@ export const StepLink: React.FunctionComponent<StepLinkConfig> = (props: StepLin
|
|||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</Wrapper>
|
</StepLinkWrapper>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const Wrapper = styled.a<WrapperProps>`
|
const StepLinkWrapper = styled.a`
|
||||||
color: ${colors.brandDark};
|
color: ${colors.brandDark};
|
||||||
padding: 21px 25px 19px;
|
padding: 21px 25px 19px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -54,6 +40,6 @@ const Wrapper = styled.a<WrapperProps>`
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const Text = styled.span`
|
const StepLinkText = styled.span`
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -1,27 +1,23 @@
|
|||||||
import * as _ from 'lodash';
|
import React from 'react';
|
||||||
import * as React from 'react';
|
import styled from 'styled-components';
|
||||||
import styled, { withTheme } from 'styled-components';
|
|
||||||
|
import { IStepLinkConfig, StepLink } from 'ts/components/docs/step_link';
|
||||||
|
|
||||||
import { StepLink, StepLinkConfig } from 'ts/components/docs/step_link';
|
|
||||||
import { colors } from 'ts/style/colors';
|
import { colors } from 'ts/style/colors';
|
||||||
|
|
||||||
export interface LinkProps {
|
export interface ILinkProps {
|
||||||
links: StepLinkConfig[];
|
links: IStepLinkConfig[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export const StepLinks: React.FunctionComponent<LinkProps> = (props: LinkProps) => (
|
export const StepLinks: React.FC<ILinkProps> = ({ links }) => (
|
||||||
<Wrapper>
|
<StepLinksWrapper>
|
||||||
{props.links.map((shortcut, index) => (
|
{links.map((link, index) => (
|
||||||
<StepLink key={`step-${index}`} {...shortcut} />
|
<StepLink key={`step-${index}`} {...link} />
|
||||||
))}
|
))}
|
||||||
</Wrapper>
|
</StepLinksWrapper>
|
||||||
);
|
);
|
||||||
|
|
||||||
StepLinks.defaultProps = {
|
const StepLinksWrapper = styled.div`
|
||||||
links: [],
|
|
||||||
};
|
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
|
||||||
background-color: ${colors.backgroundLight};
|
background-color: ${colors.backgroundLight};
|
||||||
border: 1px solid #dbdfdd;
|
border: 1px solid #dbdfdd;
|
||||||
margin-bottom: 1.875rem;
|
margin-bottom: 1.875rem;
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import styled from 'styled-components';
|
|||||||
import { Button } from 'ts/components/button';
|
import { Button } from 'ts/components/button';
|
||||||
import { CommunityLink, ICommunityLinkProps } from 'ts/components/docs/community_link';
|
import { CommunityLink, ICommunityLinkProps } from 'ts/components/docs/community_link';
|
||||||
import { Hero } from 'ts/components/docs/hero';
|
import { Hero } from 'ts/components/docs/hero';
|
||||||
import { ShortcutLink, IShortcutLinkProps } from 'ts/components/docs/shortcut_link';
|
import { IShortcutLinkProps, ShortcutLink } from 'ts/components/docs/shortcut_link';
|
||||||
import { SiteWrap } from 'ts/components/docs/siteWrap';
|
import { SiteWrap } from 'ts/components/docs/siteWrap';
|
||||||
import { StepLinkConfig } from 'ts/components/docs/step_link';
|
import { IStepLinkConfig } from 'ts/components/docs/step_link';
|
||||||
import { StepLinks } from 'ts/components/docs/step_links';
|
import { StepLinks } from 'ts/components/docs/step_links';
|
||||||
import { DocumentTitle } from 'ts/components/document_title';
|
import { DocumentTitle } from 'ts/components/document_title';
|
||||||
import { Section } from 'ts/components/newLayout';
|
import { Section } from 'ts/components/newLayout';
|
||||||
@@ -116,7 +116,7 @@ const shortcuts: IShortcutLinkProps[] = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const usefulLinks: StepLinkConfig[] = [
|
const usefulLinks: IStepLinkConfig[] = [
|
||||||
{
|
{
|
||||||
title: 'Core Concepts',
|
title: 'Core Concepts',
|
||||||
url: '/docs/core-concepts',
|
url: '/docs/core-concepts',
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { Resource } from 'ts/components/docs/resource/resource';
|
|||||||
import { ChapterLinks } from 'ts/components/docs/sidebar/chapter_links';
|
import { ChapterLinks } from 'ts/components/docs/sidebar/chapter_links';
|
||||||
import { FilterGroup, Filters } from 'ts/components/docs/sidebar/filters';
|
import { FilterGroup, Filters } from 'ts/components/docs/sidebar/filters';
|
||||||
import { SiteWrap } from 'ts/components/docs/siteWrap';
|
import { SiteWrap } from 'ts/components/docs/siteWrap';
|
||||||
import { StepLinkConfig } from 'ts/components/docs/step_link';
|
import { IStepLinkConfig } from 'ts/components/docs/step_link';
|
||||||
import { StepLinks } from 'ts/components/docs/step_links';
|
import { StepLinks } from 'ts/components/docs/step_links';
|
||||||
import { Table } from 'ts/components/docs/table';
|
import { Table } from 'ts/components/docs/table';
|
||||||
import { Tab, TabList, TabPanel, Tabs } from 'ts/components/docs/tabs';
|
import { Tab, TabList, TabPanel, Tabs } from 'ts/components/docs/tabs';
|
||||||
@@ -266,7 +266,7 @@ const H3 = styled(Heading).attrs({
|
|||||||
asElement: 'h3',
|
asElement: 'h3',
|
||||||
})``;
|
})``;
|
||||||
|
|
||||||
const usefulLinks: StepLinkConfig[] = [
|
const usefulLinks: IStepLinkConfig[] = [
|
||||||
{
|
{
|
||||||
title: 'Core Concepts',
|
title: 'Core Concepts',
|
||||||
url: '/docs/core-concepts',
|
url: '/docs/core-concepts',
|
||||||
|
|||||||
Reference in New Issue
Block a user