aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-28 02:50:02 +0800
committerFabio Berger <me@fabioberger.com>2018-09-28 02:50:02 +0800
commitac04dbf7e4f04ae4e0a6e9cce5232339597493ed (patch)
treeceac79e7921544506228aa3774dc543fe0971529 /packages/react-docs/src/components
parentcfddea931dedb77a88507517957e19350e9348b8 (diff)
downloaddexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar.gz
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar.bz2
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar.lz
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar.xz
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.tar.zst
dexon-sol-tools-ac04dbf7e4f04ae4e0a6e9cce5232339597493ed.zip
Re-use interface component for rendering structs but label it differently
Diffstat (limited to 'packages/react-docs/src/components')
-rw-r--r--packages/react-docs/src/components/type_definition.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx
index 09cb3ff74..9a3e50a1b 100644
--- a/packages/react-docs/src/components/type_definition.tsx
+++ b/packages/react-docs/src/components/type_definition.tsx
@@ -5,7 +5,7 @@ import * as _ from 'lodash';
import * as React from 'react';
import { DocsInfo } from '../docs_info';
-import { KindString } from '../types';
+import { KindString, SupportedDocJson } from '../types';
import { constants } from '../utils/constants';
import { Comment } from './comment';
@@ -46,7 +46,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef
let codeSnippet: React.ReactNode;
switch (customType.kindString) {
case KindString.Interface:
- typePrefix = 'Interface';
+ typePrefix = this.props.docsInfo.type === SupportedDocJson.SolDoc ? 'Struct' : 'Interface';
codeSnippet = (
<Interface
type={customType}