aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-18 21:54:12 +0800
committerFabio Berger <me@fabioberger.com>2018-03-18 21:54:12 +0800
commitc7302c46e57c4646dbbd0004e09e987b720b5815 (patch)
treec29821584c6aa25b47b426f2fc7196e43ae6449f /packages/website/ts/components
parent4948551703fb3cb9f8470d9f4a61a9a5473e5afa (diff)
downloaddexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar.gz
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar.bz2
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar.lz
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar.xz
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.tar.zst
dexon-sol-tools-c7302c46e57c4646dbbd0004e09e987b720b5815.zip
Add JSON Schemas docs to website
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/sidebar_header.tsx1
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx19
2 files changed, 20 insertions, 0 deletions
diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx
index 33c5ac857..6216d2146 100644
--- a/packages/website/ts/components/sidebar_header.tsx
+++ b/packages/website/ts/components/sidebar_header.tsx
@@ -8,6 +8,7 @@ const titleToIcon: { [title: string]: string } = {
'0x.js': 'zeroExJs.png',
Web3Wrapper: 'zeroExJs.png',
Deployer: 'zeroExJs.png',
+ 'JSON Schemas': '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 9cde5bf3f..9474311b4 100644
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ b/packages/website/ts/components/top_bar/top_bar.tsx
@@ -151,6 +151,12 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
primaryText={this.props.translate.get(Key.Deployer, Deco.CapWords)}
/>
</Link>,
+ <Link key="subMenuItem-jsonSchema" to={WebsitePaths.JSONSchemas} className="text-decoration-none">
+ <MenuItem
+ style={{ fontSize: styles.menuItem.fontSize }}
+ primaryText={this.props.translate.get(Key.JsonSchemas, Deco.CapWords)}
+ />
+ </Link>,
];
const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {};
const fullWidthClasses = isFullWidthPage ? 'pr4' : '';
@@ -305,6 +311,14 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</MenuItem>
</Link>
)}
+ {!this._isViewingJsonSchemasDocs() && (
+ <Link to={WebsitePaths.JSONSchemas} className="text-decoration-none">
+ <MenuItem className="py2">
+ {this.props.translate.get(Key.JsonSchemas, Deco.Cap)}{' '}
+ {this.props.translate.get(Key.Docs, Deco.Cap)}
+ </MenuItem>
+ </Link>
+ )}
{!this._isViewingPortal() && (
<Link to={`${WebsitePaths.Portal}`} className="text-decoration-none">
<MenuItem className="py2">
@@ -336,6 +350,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
!this._isViewingSmartContractsDocs() &&
!this._isViewingWeb3WrapperDocs() &&
!this._isViewingDeployerDocs() &&
+ !this._isViewingJsonSchemasDocs() &&
!this._isViewingConnectDocs()) ||
_.isUndefined(this.props.menu)
) {
@@ -430,6 +445,9 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
private _isViewingDeployerDocs() {
return _.includes(this.props.location.pathname, WebsitePaths.Deployer);
}
+ private _isViewingJsonSchemasDocs() {
+ return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas);
+ }
private _isViewingWiki() {
return _.includes(this.props.location.pathname, WebsitePaths.Wiki);
}
@@ -441,6 +459,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
this._isViewingSmartContractsDocs() ||
this._isViewingWeb3WrapperDocs() ||
this._isViewingDeployerDocs() ||
+ this._isViewingJsonSchemasDocs() ||
this._isViewingConnectDocs()
);
}