aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/signature.tsx
diff options
context:
space:
mode:
authorF. Eugene Aumson <feuGeneA@users.noreply.github.com>2018-09-26 04:34:44 +0800
committerF. Eugene Aumson <feuGeneA@users.noreply.github.com>2018-09-26 04:34:44 +0800
commitd3edb9721c21a00c40f03d5c270f19c0d9954754 (patch)
treefed69dbc80245c77af28ccc5f7c170ac8e726c7c /packages/react-docs/src/components/signature.tsx
parentde9f5d350f008f1eeb6e42a3dcf611262f6210b4 (diff)
parentb40861747b73bb9a0826853751b7caa5cbf085ae (diff)
downloaddexon-sol-tools-d3edb9721c21a00c40f03d5c270f19c0d9954754.tar.gz
dexon-sol-tools-d3edb9721c21a00c40f03d5c270f19c0d9954754.tar.zst
dexon-sol-tools-d3edb9721c21a00c40f03d5c270f19c0d9954754.zip
Merge remote-tracking branch 'upstream/development' into sol-doc
Diffstat (limited to 'packages/react-docs/src/components/signature.tsx')
-rw-r--r--packages/react-docs/src/components/signature.tsx21
1 files changed, 13 insertions, 8 deletions
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 9eb8a7d86..a690a1f03 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -135,14 +135,19 @@ function renderTypeParameter(
): React.ReactNode {
const typeParam = (
<span>
- {`<${typeParameter.name} extends `}
- <Type
- type={typeParameter.type}
- sectionName={sectionName}
- typeDefinitionByName={typeDefinitionByName}
- docsInfo={docsInfo}
- isInPopover={isInPopover}
- />
+ {`<${typeParameter.name}`}
+ {!_.isUndefined(typeParameter.type) && (
+ <span>
+ {' extends '}
+ <Type
+ type={typeParameter.type}
+ sectionName={sectionName}
+ typeDefinitionByName={typeDefinitionByName}
+ docsInfo={docsInfo}
+ isInPopover={isInPopover}
+ />
+ </span>
+ )}
{`>`}
</span>
);