aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-17 06:25:51 +0800
committerFabio Berger <me@fabioberger.com>2018-10-17 06:25:51 +0800
commitfdefa5952cb6cb6e1dce42e862dbc676690cdcbb (patch)
tree2643c34cdf0006dc743ce99cfebdfe957c178d37 /packages/website/ts/pages/documentation
parent7f2636fd05cdab3addd58f340bf25d93c3a59d00 (diff)
downloaddexon-0x-contracts-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.tar.gz
dexon-0x-contracts-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.tar.zst
dexon-0x-contracts-fdefa5952cb6cb6e1dce42e862dbc676690cdcbb.zip
chore: componentize the sidebar header
Diffstat (limited to 'packages/website/ts/pages/documentation')
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx39
1 files changed, 9 insertions, 30 deletions
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
index 65d9b68a9..a2babeda2 100644
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ b/packages/website/ts/pages/documentation/doc_page.tsx
@@ -6,15 +6,14 @@ import {
SupportedDocJson,
TypeDocUtils,
} from '@0xproject/react-docs';
-import { colors, NestedSidebarMenu } from '@0xproject/react-shared';
+import { NestedSidebarMenu } from '@0xproject/react-shared';
import findVersions = require('find-versions');
import * as _ from 'lodash';
import CircularProgress from 'material-ui/CircularProgress';
import * as React from 'react';
import semverSort = require('semver-sort');
-import { VersionDropDown } from 'ts/components/documentation/version_drop_down';
+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 { DocPackages, ScreenWidths } from 'ts/types';
@@ -109,33 +108,13 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
}
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"
- >
- {this.props.docsInfo.displayName}
- </Text>
- </Container>
- <div className="right" style={{ alignSelf: 'flex-end' }}>
- <VersionDropDown
- selectedVersion={this.props.docsVersion}
- versions={this.props.availableDocVersions}
- onVersionSelected={this._onVersionSelected.bind(this)}
- />
- </div>
- </Container>
- <Container
- width={'100%'}
- height={'1px'}
- backgroundColor={colors.grey300}
- marginTop="20px"
- marginBottom="27px"
- />
- </Container>
+ <SidebarHeader
+ screenWidth={this.props.screenWidth}
+ title={this.props.docsInfo.displayName}
+ docsVersion={this.props.docsVersion}
+ availableDocVersions={this.props.availableDocVersions}
+ onVersionSelected={this._onVersionSelected.bind(this)}
+ />
);
}
private _renderLoading(): React.ReactNode {