From 28d63ad8e12389b2a9fa23306e40f4b87be3b469 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 14 Mar 2018 16:37:24 +0100 Subject: Add Web3Wrapper docs to website --- packages/website/ts/components/sidebar_header.tsx | 1 + packages/website/ts/components/top_bar/top_bar.tsx | 23 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'packages/website/ts/components') diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx index 519b23d80..24bd30207 100644 --- a/packages/website/ts/components/sidebar_header.tsx +++ b/packages/website/ts/components/sidebar_header.tsx @@ -6,6 +6,7 @@ const SHOW_DURATION_MS = 4000; const titleToIcon: { [title: string]: string } = { '0x.js': 'zeroExJs.png', + Web3Wrapper: 'zeroExJs.png', '0x Connect': 'connect.png', '0x Smart Contracts': 'contracts.png', Wiki: 'wiki.png', diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 29c68524c..ec8a69a9b 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -139,6 +139,12 @@ export class TopBar extends React.Component { primaryText={this.props.translate.get(Key.Whitepaper, Deco.CapWords)} /> , + + + , ]; const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {}; const fullWidthClasses = isFullWidthPage ? 'pr4' : ''; @@ -277,6 +283,14 @@ export class TopBar extends React.Component { )} + {!this._isViewingWeb3WrapperDocs() && ( + + + {this.props.translate.get(Key.Web3Wrapper, Deco.Cap)}{' '} + {this.props.translate.get(Key.Docs, Deco.Cap)} + + + )} {!this._isViewingPortal() && ( @@ -304,7 +318,10 @@ export class TopBar extends React.Component { } private _renderDocsMenu(): React.ReactNode { if ( - (!this._isViewing0xjsDocs() && !this._isViewingSmartContractsDocs() && !this._isViewingConnectDocs()) || + (!this._isViewing0xjsDocs() && + !this._isViewingSmartContractsDocs() && + !this._isViewingWeb3WrapperDocs() && + !this._isViewingConnectDocs()) || _.isUndefined(this.props.menu) ) { return undefined; @@ -392,6 +409,9 @@ export class TopBar extends React.Component { private _isViewingSmartContractsDocs() { return _.includes(this.props.location.pathname, WebsitePaths.SmartContracts); } + private _isViewingWeb3WrapperDocs() { + return _.includes(this.props.location.pathname, WebsitePaths.Web3Wrapper); + } private _isViewingWiki() { return _.includes(this.props.location.pathname, WebsitePaths.Wiki); } @@ -401,6 +421,7 @@ export class TopBar extends React.Component { this._isViewing0xjsDocs() || this._isViewingFAQ() || this._isViewingSmartContractsDocs() || + this._isViewingWeb3WrapperDocs() || this._isViewingConnectDocs() ); } -- cgit v1.2.3