aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-06 23:46:07 +0800
committerFabio Berger <me@fabioberger.com>2018-03-06 23:46:07 +0800
commit9301173f7d42548935e79ce64e64ad9320c860b5 (patch)
treebae5892b2173e726427707042090fa83d099b6b9 /packages
parent60d95475ebcfc868e54f90350fcca09e45b976ff (diff)
downloaddexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar.gz
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar.bz2
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar.lz
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar.xz
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.tar.zst
dexon-sol-tools-9301173f7d42548935e79ce64e64ad9320c860b5.zip
Rename docsVersion prop to selectedVersion and docsVersions to versions for clarity
Diffstat (limited to 'packages')
-rw-r--r--packages/react-docs/src/ts/components/documentation.tsx16
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx4
2 files changed, 10 insertions, 10 deletions
diff --git a/packages/react-docs/src/ts/components/documentation.tsx b/packages/react-docs/src/ts/components/documentation.tsx
index 5c261a39b..dfc041361 100644
--- a/packages/react-docs/src/ts/components/documentation.tsx
+++ b/packages/react-docs/src/ts/components/documentation.tsx
@@ -47,8 +47,8 @@ const networkNameToColor: { [network: string]: string } = {
};
export interface DocumentationProps {
- docsVersion: string;
- availableDocVersions: string[];
+ selectedVersion: string;
+ availableVersions: string[];
docsInfo: DocsInfo;
docAgnosticFormat?: DocAgnosticFormat;
menuSubsectionsBySection: MenuSubsectionsBySection;
@@ -107,10 +107,10 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
}}
>
<NestedSidebarMenu
- selectedVersion={this.props.docsVersion}
- versions={this.props.availableDocVersions}
+ selectedVersion={this.props.selectedVersion}
+ versions={this.props.availableVersions}
title={this.props.docsInfo.displayName}
- topLevelMenu={this.props.docsInfo.getMenu(this.props.docsVersion)}
+ topLevelMenu={this.props.docsInfo.getMenu(this.props.selectedVersion)}
menuSubsectionsBySection={this.props.menuSubsectionsBySection}
/>
</div>
@@ -259,7 +259,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
}
const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[
- this.props.docsVersion
+ this.props.selectedVersion
];
const badges = _.map(
networkToAddressByContractName,
@@ -306,7 +306,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
</code>
{property.source && (
<SourceLink
- version={this.props.docsVersion}
+ version={this.props.selectedVersion}
source={property.source}
sourceUrl={this.props.sourceUrl}
/>
@@ -327,7 +327,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
sectionName={sectionName}
method={method}
typeDefinitionByName={typeDefinitionByName}
- libraryVersion={this.props.docsVersion}
+ libraryVersion={this.props.selectedVersion}
docsInfo={this.props.docsInfo}
sourceUrl={this.props.sourceUrl}
/>
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
index 98a6a6413..eabeddabd 100644
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ b/packages/website/ts/pages/documentation/doc_page.tsx
@@ -81,8 +81,8 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
translate={this.props.translate}
/>
<Documentation
- docsVersion={this.props.docsVersion}
- availableDocVersions={this.props.availableDocVersions}
+ selectedVersion={this.props.docsVersion}
+ availableVersions={this.props.availableDocVersions}
docsInfo={this.props.docsInfo}
docAgnosticFormat={this.state.docAgnosticFormat}
menuSubsectionsBySection={menuSubsectionsBySection}