aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation/interface.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-12-22 00:28:06 +0800
committerFabio Berger <me@fabioberger.com>2017-12-22 00:28:06 +0800
commit3e91773cd94162fca1855638a76d7bd2f510558a (patch)
treef8dc443b35a6c306d917c17a63724522d4ccd8a1 /packages/website/ts/pages/documentation/interface.tsx
parent66cf60f9cb62828e67135835e13b12d8099a66b4 (diff)
downloaddexon-0x-contracts-3e91773cd94162fca1855638a76d7bd2f510558a.tar.gz
dexon-0x-contracts-3e91773cd94162fca1855638a76d7bd2f510558a.tar.zst
dexon-0x-contracts-3e91773cd94162fca1855638a76d7bd2f510558a.zip
Add sectionName prefix to all anchor links in order to fix method name collisions between sections
Diffstat (limited to 'packages/website/ts/pages/documentation/interface.tsx')
-rw-r--r--packages/website/ts/pages/documentation/interface.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/website/ts/pages/documentation/interface.tsx b/packages/website/ts/pages/documentation/interface.tsx
index e671db2b8..1a6b562fe 100644
--- a/packages/website/ts/pages/documentation/interface.tsx
+++ b/packages/website/ts/pages/documentation/interface.tsx
@@ -7,6 +7,7 @@ import {CustomType, TypeDocTypes} from 'ts/types';
interface InterfaceProps {
type: CustomType;
+ sectionName: string;
docsInfo: DocsInfo;
}
@@ -17,9 +18,14 @@ export function Interface(props: InterfaceProps) {
<span key={`property-${property.name}-${property.type}-${type.name}`}>
{property.name}:{' '}
{property.type.typeDocType !== TypeDocTypes.Reflection ?
- <Type type={property.type} docsInfo={props.docsInfo} /> :
+ <Type
+ type={property.type}
+ sectionName={props.sectionName}
+ docsInfo={props.docsInfo}
+ /> :
<MethodSignature
method={property.type.method}
+ sectionName={props.sectionName}
shouldHideMethodName={true}
shouldUseArrowSyntax={true}
docsInfo={props.docsInfo}
@@ -33,7 +39,7 @@ export function Interface(props: InterfaceProps) {
const is = type.indexSignature;
const param = (
<span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}>
- {is.keyName}: <Type type={is.keyType} docsInfo={props.docsInfo} />
+ {is.keyName}: <Type type={is.keyType} sectionName={props.sectionName} docsInfo={props.docsInfo} />
</span>
);
properties.push((