diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-17 06:25:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-17 06:25:51 +0800 |
commit | fdefa5952cb6cb6e1dce42e862dbc676690cdcbb (patch) | |
tree | 2643c34cdf0006dc743ce99cfebdfe957c178d37 /packages/website/ts/pages/wiki/wiki.tsx | |
parent | 7f2636fd05cdab3addd58f340bf25d93c3a59d00 (diff) | |
download | dexon-sol-tools-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.tar.gz dexon-sol-tools-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.tar.zst dexon-sol-tools-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.zip |
chore: componentize the sidebar header
Diffstat (limited to 'packages/website/ts/pages/wiki/wiki.tsx')
-rw-r--r-- | packages/website/ts/pages/wiki/wiki.tsx | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 4b101e45d..e7754fd9d 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -1,6 +1,5 @@ import { ALink, - colors, constants as sharedConstants, HeaderSizes, MarkdownSection, @@ -11,11 +10,11 @@ import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; +import { SidebarHeader } from 'ts/components/documentation/sidebar_header'; import { Container } from 'ts/components/ui/container'; -import { Text } from 'ts/components/ui/text'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Article, ArticlesBySection, ScreenWidths } from 'ts/types'; +import { Article, ArticlesBySection, Deco, Key, ScreenWidths } from 'ts/types'; import { backendClient } from 'ts/utils/backend_client'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -88,28 +87,8 @@ export class Wiki extends React.Component<WikiProps, WikiState> { ); } private _renderSidebarHeader(): React.ReactNode { - return ( - <Container> - <Container className="flex justify-bottom"> - <Container className="left pl1" width="150px"> - <Text - fontColor={colors.lightLinkBlue} - fontSize={this.props.screenWidth === ScreenWidths.Sm ? '20px' : '22px'} - fontWeight="bold" - > - Wiki - </Text> - </Container> - </Container> - <Container - width={'100%'} - height={'1px'} - backgroundColor={colors.grey300} - marginTop="20px" - marginBottom="27px" - /> - </Container> - ); + const wikiTitle = this.props.translate.get(Key.Wiki, Deco.Cap); + return <SidebarHeader screenWidth={this.props.screenWidth} title={wikiTitle} />; } private _renderLoading(): React.ReactNode { return ( |