diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-17 07:55:47 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-17 07:55:47 +0800 |
commit | 62f4bb21178415a1f5c8f55066a768671e852317 (patch) | |
tree | a4431e78ea554026c770f022a82d15db76f0627d /packages/website | |
parent | ce43724bd449153842aa17b5c58daa9625b6ed65 (diff) | |
download | dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar.gz dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar.bz2 dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar.lz dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar.xz dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.tar.zst dexon-0x-contracts-62f4bb21178415a1f5c8f55066a768671e852317.zip |
chore: Add topBar menu in wiki mobile sidebar menu
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/ts/pages/wiki/wiki.tsx | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index e7754fd9d..76d52c9bd 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -1,7 +1,9 @@ import { ALink, + colors, constants as sharedConstants, HeaderSizes, + Link, MarkdownSection, NestedSidebarMenu, utils as sharedUtils, @@ -11,6 +13,7 @@ import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; import { SidebarHeader } from 'ts/components/documentation/sidebar_header'; +import { Button } from 'ts/components/ui/button'; import { Container } from 'ts/components/ui/container'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; @@ -87,8 +90,33 @@ export class Wiki extends React.Component<WikiProps, WikiState> { ); } private _renderSidebarHeader(): React.ReactNode { + const menuItems = _.map(constants.DEVELOPER_TOPBAR_LINKS, menuItemInfo => { + return ( + <Link + key={`menu-item-${menuItemInfo.title}`} + to={menuItemInfo.to} + shouldOpenInNewTab={menuItemInfo.shouldOpenInNewTab} + > + <Button + borderRadius="4px" + padding="0.4em 6px" + width="100%" + fontColor={colors.grey800} + fontSize="14px" + textAlign="left" + > + {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)} + </Button> + </Link> + ); + }); const wikiTitle = this.props.translate.get(Key.Wiki, Deco.Cap); - return <SidebarHeader screenWidth={this.props.screenWidth} title={wikiTitle} />; + return ( + <Container> + <SidebarHeader screenWidth={this.props.screenWidth} title={wikiTitle} /> + {menuItems} + </Container> + ); } private _renderLoading(): React.ReactNode { return ( |