diff options
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/example/ts/index.tsx | 7 | ||||
-rw-r--r-- | packages/react-docs/example/ts/json/0.2.0.json (renamed from packages/react-docs/example/ts/json/web3_wrapper_typedoc_output.json) | 0 | ||||
-rw-r--r-- | packages/react-docs/src/ts/components/documentation.tsx | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/packages/react-docs/example/ts/index.tsx b/packages/react-docs/example/ts/index.tsx index 8cfa8451c..bf7574e7b 100644 --- a/packages/react-docs/example/ts/index.tsx +++ b/packages/react-docs/example/ts/index.tsx @@ -50,7 +50,7 @@ const sourceUrl = `${ docsInfoConfig.packageUrl }/blob/@0xproject/web3-wrapper%40${selectedVersion}/packages/web3-wrapper`; -import * as typeDocJson from './json/web3_wrapper_typedoc_output.json'; +import * as typeDocJson from './json/0.2.0.json'; const docAgnosticFormat = docsInfo.convertToDocAgnosticFormat(typeDocJson); render( @@ -61,7 +61,12 @@ render( docsInfo={docsInfo} docAgnosticFormat={docAgnosticFormat} sourceUrl={sourceUrl} + onVersionSelected={onVersionSelected} /> </MuiThemeProvider>, document.getElementById('app'), ); + +function onVersionSelected(semver: string) { + // TODO +} diff --git a/packages/react-docs/example/ts/json/web3_wrapper_typedoc_output.json b/packages/react-docs/example/ts/json/0.2.0.json index b2e01f614..b2e01f614 100644 --- a/packages/react-docs/example/ts/json/web3_wrapper_typedoc_output.json +++ b/packages/react-docs/example/ts/json/0.2.0.json diff --git a/packages/react-docs/src/ts/components/documentation.tsx b/packages/react-docs/src/ts/components/documentation.tsx index 58523a1a9..b5e2bbb9d 100644 --- a/packages/react-docs/src/ts/components/documentation.tsx +++ b/packages/react-docs/src/ts/components/documentation.tsx @@ -48,9 +48,10 @@ export interface DocumentationProps { selectedVersion: string; availableVersions: string[]; docsInfo: DocsInfo; + sourceUrl: string; + onVersionSelected: (semver: string) => void; docAgnosticFormat?: DocAgnosticFormat; sidebarHeader?: React.ReactNode; - sourceUrl: string; topBarHeight?: number; } @@ -125,6 +126,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta sidebarHeader={this.props.sidebarHeader} topLevelMenu={this.props.docsInfo.getMenu(this.props.selectedVersion)} menuSubsectionsBySection={menuSubsectionsBySection} + onVersionSelected={this.props.onVersionSelected} /> </div> </div> |