aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-docs/src/components/signature.tsx
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2018-04-12 08:20:52 +0800
committerGitHub <noreply@github.com>2018-04-12 08:20:52 +0800
commitbe73084e04264d44cfbd7cf6b8ba3a993368133d (patch)
tree68fc540971871fd99d0977957ac20132d6efed60 /packages/react-docs/src/components/signature.tsx
parent63b941fbaf08167234cf7871e874c1a96e4347fa (diff)
parent5eb90697c824f1c98467cdb6cd71dbb94ff70805 (diff)
downloaddexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.gz
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.bz2
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.lz
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.xz
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.tar.zst
dexon-sol-tools-be73084e04264d44cfbd7cf6b8ba3a993368133d.zip
Merge branch 'development' into feature/subproviders/mnemonic-wallet-subprovider
Diffstat (limited to 'packages/react-docs/src/components/signature.tsx')
-rw-r--r--packages/react-docs/src/components/signature.tsx2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
index 83fb1e246..1d3c90261 100644
--- a/packages/react-docs/src/components/signature.tsx
+++ b/packages/react-docs/src/components/signature.tsx
@@ -91,6 +91,7 @@ function renderParameters(
) {
const params = _.map(parameters, (p: Parameter) => {
const isOptional = p.isOptional;
+ const hasDefaultValue = !_.isUndefined(p.defaultValue);
const type = (
<Type
type={p.type}
@@ -103,6 +104,7 @@ function renderParameters(
<span key={`param-${p.type}-${p.name}`}>
{p.name}
{isOptional && '?'}: {type}
+ {hasDefaultValue && ` = ${p.defaultValue}`}
</span>
);
});