aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-07 20:25:15 +0800
committerFabio Berger <me@fabioberger.com>2018-03-07 20:25:15 +0800
commit6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d (patch)
tree7d9030c062e22043cd49f27527c9d4537e41e618 /packages/react-docs/src
parent327cc307b35bf4a38c86f87c45718fd456025035 (diff)
downloaddexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.gz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.bz2
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.lz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.xz
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.tar.zst
dexon-sol-tools-6f8a70834b72d678cd9d171d7bb0a3a2cfb4134d.zip
Add onSelectedVersion callback so it can be handled in any way the caller wishes
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r--packages/react-docs/src/ts/components/documentation.tsx4
1 files changed, 3 insertions, 1 deletions
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>