From 14ad5ced78df59603aa28072dbbab3513abac509 Mon Sep 17 00:00:00 2001 From: Piotr Janosz Date: Thu, 4 Jul 2019 18:21:14 +0200 Subject: [PATCH] Refactored community link props --- .../ts/components/docs/community_link.tsx | 54 ++++++------------- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/packages/website/ts/components/docs/community_link.tsx b/packages/website/ts/components/docs/community_link.tsx index a19b540d2a..2d96f44be6 100644 --- a/packages/website/ts/components/docs/community_link.tsx +++ b/packages/website/ts/components/docs/community_link.tsx @@ -1,55 +1,35 @@ -import { Link } from '@0x/react-shared'; -import * as _ from 'lodash'; -import * as React from 'react'; -import styled, { withTheme } from 'styled-components'; +import React from 'react'; +import styled 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 { WebsitePaths } from 'ts/types'; -import { constants } from 'ts/utils/constants'; -export interface CommunityLinkProps { +import { colors } from 'ts/style/colors'; + +export interface ICommunityLinkProps { heading: string; icon: string; description?: string; url: string; shouldOpenInNewTab?: boolean; - isHome?: boolean; } -interface WrapperProps { - isHome?: boolean; -} - -export const CommunityLink: React.FunctionComponent = (props: CommunityLinkProps) => ( - <> - -
- - - {props.heading} - - - {props.description} - -
-
- +export const CommunityLink: React.FC = props => ( + + + + {props.heading} + + + {props.description} + + ); -CommunityLink.defaultProps = { - isHome: false, -}; - -const Wrapper = styled.a` +const Wrapper = styled.a` background-color: ${colors.backgroundLight}; border: 1px solid #dbdfdd; - padding: 50px 50px; + padding: 50px; display: flex; flex-direction: column; align-items: center;