Add onSelectedVersion callback so it can be handled in any way the caller wishes

This commit is contained in:
Fabio Berger
2018-03-07 13:25:15 +01:00
parent 327cc307b3
commit 6f8a70834b
9 changed files with 35 additions and 17 deletions

View File

@@ -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
}