aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-02 03:00:45 +0800
committerFabio Berger <me@fabioberger.com>2018-08-02 03:00:45 +0800
commit2494af99aad4dd58c0d4e647dedf72946cb3c20b (patch)
treed2c20e41b4cd11874a222897970b2597b2e03092 /packages/react-docs
parente5b93d1f0292cb6cc38d3f92d623b27cba6ac233 (diff)
downloaddexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar.gz
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar.bz2
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar.lz
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar.xz
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.tar.zst
dexon-sol-tools-2494af99aad4dd58c0d4e647dedf72946cb3c20b.zip
Prefix menu and sections with markdown as that is all the should now be defined
Diffstat (limited to 'packages/react-docs')
-rw-r--r--packages/react-docs/src/docs_info.ts9
-rw-r--r--packages/react-docs/src/types.ts4
2 files changed, 4 insertions, 9 deletions
diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts
index dd3cb9a96..0637f3e65 100644
--- a/packages/react-docs/src/docs_info.ts
+++ b/packages/react-docs/src/docs_info.ts
@@ -28,21 +28,16 @@ export class DocsInfo {
public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
public typeConfigs: DocsInfoTypeConfigs;
- private readonly _docsInfo: DocsInfoConfig;
constructor(config: DocsInfoConfig) {
this.id = config.id;
this.type = config.type;
- this.menu = config.menu;
+ this.menu = config.markdownMenu;
this.displayName = config.displayName;
this.packageUrl = config.packageUrl;
- this.sections = config.sections;
+ this.sections = config.markdownSections;
this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion;
this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId;
this.typeConfigs = config.typeConfigs;
- this._docsInfo = config;
- }
- public getMenu(selectedVersion?: string): { [section: string]: string[] } {
- return this._docsInfo.menu;
}
public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection {
const menuSubsectionsBySection = {} as MenuSubsectionsBySection;
diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts
index ca869df1c..aebd823db 100644
--- a/packages/react-docs/src/types.ts
+++ b/packages/react-docs/src/types.ts
@@ -7,8 +7,8 @@ export interface DocsInfoConfig {
type: SupportedDocJson;
displayName: string;
packageUrl: string;
- menu: DocsMenu;
- sections: SectionsMap;
+ markdownMenu: DocsMenu;
+ markdownSections: SectionsMap;
sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
typeConfigs?: DocsInfoTypeConfigs;