aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation/type_definition.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/pages/documentation/type_definition.tsx')
-rw-r--r--packages/website/ts/pages/documentation/type_definition.tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/website/ts/pages/documentation/type_definition.tsx b/packages/website/ts/pages/documentation/type_definition.tsx
index 09413faaf..77434d2ed 100644
--- a/packages/website/ts/pages/documentation/type_definition.tsx
+++ b/packages/website/ts/pages/documentation/type_definition.tsx
@@ -13,6 +13,7 @@ import {colors} from 'ts/utils/colors';
import {utils} from 'ts/utils/utils';
interface TypeDefinitionProps {
+ sectionName: string;
customType: CustomType;
shouldAddId?: boolean;
docsInfo: DocsInfo;
@@ -46,6 +47,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
codeSnippet = (
<Interface
type={customType}
+ sectionName={this.props.sectionName}
docsInfo={this.props.docsInfo}
/>
);
@@ -85,9 +87,14 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
type
</span> {customType.name} ={' '}
{customType.type.typeDocType !== TypeDocTypes.Reflection ?
- <Type type={customType.type} docsInfo={this.props.docsInfo} /> :
+ <Type
+ type={customType.type}
+ sectionName={this.props.sectionName}
+ docsInfo={this.props.docsInfo}
+ /> :
<MethodSignature
method={customType.type.method}
+ sectionName={this.props.sectionName}
shouldHideMethodName={true}
shouldUseArrowSyntax={true}
docsInfo={this.props.docsInfo}
@@ -101,7 +108,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
throw utils.spawnSwitchErr('type.kindString', customType.kindString);
}
- const typeDefinitionAnchorId = customType.name;
+ const typeDefinitionAnchorId = `${this.props.sectionName}-${customType.name}`;
return (
<div
id={this.props.shouldAddId ? typeDefinitionAnchorId : ''}