aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-02 06:01:02 +0800
committerFabio Berger <me@fabioberger.com>2018-08-02 06:01:02 +0800
commit0132286cab49ff6c705abd70cdd89e36b3550c27 (patch)
tree3fced9e9822d9807e3e688da0de72369eebb0c7d /packages/website/ts/containers
parent2494af99aad4dd58c0d4e647dedf72946cb3c20b (diff)
downloaddexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar.gz
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar.bz2
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar.lz
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar.xz
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.tar.zst
dexon-sol-tools-0132286cab49ff6c705abd70cdd89e36b3550c27.zip
Add contract-wrappers page and make topBar component more concise
Diffstat (limited to 'packages/website/ts/containers')
-rw-r--r--packages/website/ts/containers/contract_wrappers_documentation.ts56
1 files changed, 56 insertions, 0 deletions
diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts
new file mode 100644
index 000000000..f0547cecd
--- /dev/null
+++ b/packages/website/ts/containers/contract_wrappers_documentation.ts
@@ -0,0 +1,56 @@
+import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs';
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { DocPackages } from 'ts/types';
+import { constants } from 'ts/utils/constants';
+import { Translate } from 'ts/utils/translate';
+
+// TODO: Add MD sections
+const markdownSections = {};
+
+const docsInfoConfig: DocsInfoConfig = {
+ id: DocPackages.ContractWrappers,
+ type: SupportedDocJson.TypeDoc,
+ displayName: 'Contract Wrappers',
+ packageUrl: 'https://github.com/0xProject/0x-monorepo',
+ markdownMenu: {},
+ sectionNameToMarkdownByVersion: {},
+ markdownSections,
+ typeConfigs: {
+ typeNameToPrefix: {},
+ typeNameToExternalLink: {
+ BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
+ },
+ },
+};
+const docsInfo = new DocsInfo(docsInfoConfig);
+
+interface ConnectedState {
+ docsVersion: string;
+ availableDocVersions: string[];
+ docsInfo: DocsInfo;
+ translate: Translate;
+}
+
+interface ConnectedDispatch {
+ dispatcher: Dispatcher;
+}
+
+const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
+ docsVersion: state.docsVersion,
+ availableDocVersions: state.availableDocVersions,
+ docsInfo,
+ translate: state.translate,
+});
+
+const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
+ dispatcher: new Dispatcher(dispatch),
+});
+
+export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocPageComponent,
+);