diff options
Diffstat (limited to 'packages/react-docs')
-rw-r--r-- | packages/react-docs/src/components/signature.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx index aa174042c..266bfe3dd 100644 --- a/packages/react-docs/src/components/signature.tsx +++ b/packages/react-docs/src/components/signature.tsx @@ -118,9 +118,14 @@ function renderParameters( /> ); return ( - <span key={`param-${p.type}-${p.name}`}> + <span key={`param-${JSON.stringify(p.type)}-${name}-${i}`}> + {!_.isEmpty(p.name) && ( + <span> {p.name} - {isOptional && '?'}: {type} + {isOptional && '?'}:{' '} + </span> + )} + {type} {hasDefaultValue && ` = ${p.defaultValue}`} </span> ); |