aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/interface.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-08-15 08:24:48 +0800
committerFabio Berger <me@fabioberger.com>2018-08-15 08:24:48 +0800
commitcb5d8d75bf03910d1e763eb34907ada296ed3062 (patch)
tree2e9533026ac91799326419445f04b9d424347c66 /packages/react-docs/src/components/interface.tsx
parent267078ed6cea11aa8accc2336898694b77e8f169 (diff)
downloaddexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar.gz
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar.bz2
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar.lz
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar.xz
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.tar.zst
dexon-sol-tools-cb5d8d75bf03910d1e763eb34907ada296ed3062.zip
Link class reference types exported in same package to their declaration
Diffstat (limited to 'packages/react-docs/src/components/interface.tsx')
-rw-r--r--packages/react-docs/src/components/interface.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx
index eaf57ce93..93b10e96d 100644
--- a/packages/react-docs/src/components/interface.tsx
+++ b/packages/react-docs/src/components/interface.tsx
@@ -7,14 +7,17 @@ import { CustomType, TypeDefinitionByName } from '../types';
import { Signature } from './signature';
import { Type } from './type';
+const defaultProps = {};
+
export interface InterfaceProps {
type: CustomType;
sectionName: string;
docsInfo: DocsInfo;
typeDefinitionByName: TypeDefinitionByName;
+ isInPopover: boolean;
}
-export const Interface = (props: InterfaceProps) => {
+export const Interface: React.SFC<InterfaceProps> = (props: InterfaceProps): any => {
const type = props.type;
const properties = _.map(type.children, property => {
return (
@@ -31,6 +34,7 @@ export const Interface = (props: InterfaceProps) => {
shouldUseArrowSyntax={true}
docsInfo={props.docsInfo}
typeDefinitionByName={props.typeDefinitionByName}
+ isInPopover={props.isInPopover}
/>
) : (
<Type
@@ -38,6 +42,7 @@ export const Interface = (props: InterfaceProps) => {
sectionName={props.sectionName}
docsInfo={props.docsInfo}
typeDefinitionByName={props.typeDefinitionByName}
+ isInPopover={props.isInPopover}
/>
)},
</span>
@@ -54,6 +59,7 @@ export const Interface = (props: InterfaceProps) => {
sectionName={props.sectionName}
docsInfo={props.docsInfo}
typeDefinitionByName={props.typeDefinitionByName}
+ isInPopover={props.isInPopover}
/>
</span>
);
@@ -77,3 +83,5 @@ export const Interface = (props: InterfaceProps) => {
</span>
);
};
+
+Interface.defaultProps = defaultProps;