Rename docsVersion prop to selectedVersion and docsVersions to versions for clarity
This commit is contained in:
parent
60d95475eb
commit
9301173f7d
@ -47,8 +47,8 @@ const networkNameToColor: { [network: string]: string } = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export interface DocumentationProps {
|
export interface DocumentationProps {
|
||||||
docsVersion: string;
|
selectedVersion: string;
|
||||||
availableDocVersions: string[];
|
availableVersions: string[];
|
||||||
docsInfo: DocsInfo;
|
docsInfo: DocsInfo;
|
||||||
docAgnosticFormat?: DocAgnosticFormat;
|
docAgnosticFormat?: DocAgnosticFormat;
|
||||||
menuSubsectionsBySection: MenuSubsectionsBySection;
|
menuSubsectionsBySection: MenuSubsectionsBySection;
|
||||||
@ -107,10 +107,10 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<NestedSidebarMenu
|
<NestedSidebarMenu
|
||||||
selectedVersion={this.props.docsVersion}
|
selectedVersion={this.props.selectedVersion}
|
||||||
versions={this.props.availableDocVersions}
|
versions={this.props.availableVersions}
|
||||||
title={this.props.docsInfo.displayName}
|
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}
|
menuSubsectionsBySection={this.props.menuSubsectionsBySection}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -259,7 +259,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
|||||||
}
|
}
|
||||||
|
|
||||||
const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[
|
const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[
|
||||||
this.props.docsVersion
|
this.props.selectedVersion
|
||||||
];
|
];
|
||||||
const badges = _.map(
|
const badges = _.map(
|
||||||
networkToAddressByContractName,
|
networkToAddressByContractName,
|
||||||
@ -306,7 +306,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
|||||||
</code>
|
</code>
|
||||||
{property.source && (
|
{property.source && (
|
||||||
<SourceLink
|
<SourceLink
|
||||||
version={this.props.docsVersion}
|
version={this.props.selectedVersion}
|
||||||
source={property.source}
|
source={property.source}
|
||||||
sourceUrl={this.props.sourceUrl}
|
sourceUrl={this.props.sourceUrl}
|
||||||
/>
|
/>
|
||||||
@ -327,7 +327,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta
|
|||||||
sectionName={sectionName}
|
sectionName={sectionName}
|
||||||
method={method}
|
method={method}
|
||||||
typeDefinitionByName={typeDefinitionByName}
|
typeDefinitionByName={typeDefinitionByName}
|
||||||
libraryVersion={this.props.docsVersion}
|
libraryVersion={this.props.selectedVersion}
|
||||||
docsInfo={this.props.docsInfo}
|
docsInfo={this.props.docsInfo}
|
||||||
sourceUrl={this.props.sourceUrl}
|
sourceUrl={this.props.sourceUrl}
|
||||||
/>
|
/>
|
||||||
|
@ -81,8 +81,8 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> {
|
|||||||
translate={this.props.translate}
|
translate={this.props.translate}
|
||||||
/>
|
/>
|
||||||
<Documentation
|
<Documentation
|
||||||
docsVersion={this.props.docsVersion}
|
selectedVersion={this.props.docsVersion}
|
||||||
availableDocVersions={this.props.availableDocVersions}
|
availableVersions={this.props.availableDocVersions}
|
||||||
docsInfo={this.props.docsInfo}
|
docsInfo={this.props.docsInfo}
|
||||||
docAgnosticFormat={this.state.docAgnosticFormat}
|
docAgnosticFormat={this.state.docAgnosticFormat}
|
||||||
menuSubsectionsBySection={menuSubsectionsBySection}
|
menuSubsectionsBySection={menuSubsectionsBySection}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user