aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/property_block.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-07 03:28:21 +0800
committerFabio Berger <me@fabioberger.com>2018-08-07 03:28:21 +0800
commit6182d2c7f60967a978f2b885e63fab067794b452 (patch)
tree6480c171cf7d45572f54bc0b9797596e8c76b300 /packages/react-docs/src/components/property_block.tsx
parentaf90a777c6d6cdd59b4d398b6b0f5051047bc5d3 (diff)
downloaddexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar.gz
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar.bz2
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar.lz
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar.xz
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.tar.zst
dexon-0x-contracts-6182d2c7f60967a978f2b885e63fab067794b452.zip
Pass in typeDefinitionByName so that type declarations also link to inner-types and show the popover
Diffstat (limited to 'packages/react-docs/src/components/property_block.tsx')
-rw-r--r--packages/react-docs/src/components/property_block.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx
index ea80ba7b7..6e5c451be 100644
--- a/packages/react-docs/src/components/property_block.tsx
+++ b/packages/react-docs/src/components/property_block.tsx
@@ -2,7 +2,7 @@ import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared';
import * as React from 'react';
import { DocsInfo } from '../docs_info';
-import { Property } from '../types';
+import { Property, TypeDefinitionByName } from '../types';
import { constants } from '../utils/constants';
import { Comment } from './comment';
@@ -15,6 +15,7 @@ export interface PropertyBlockProps {
docsInfo: DocsInfo;
sourceUrl: string;
selectedVersion: string;
+ typeDefinitionByName: TypeDefinitionByName;
}
export interface PropertyBlockState {
@@ -50,7 +51,12 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB
<code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
{(property as any).callPath}
{property.name}:{' '}
- <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} />
+ <Type
+ type={property.type}
+ sectionName={sectionName}
+ docsInfo={this.props.docsInfo}
+ typeDefinitionByName={this.props.typeDefinitionByName}
+ />
</code>
{property.source && (
<SourceLink