From 17d4b467d468d997867843361ed623b6edb0a768 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 27 Sep 2018 23:00:25 +0100 Subject: Only show arguments if the params are named (i.e not generated getters) --- packages/react-docs/src/components/signature_block.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 1e3de3e58..cad72daf4 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -32,7 +32,6 @@ export interface SignatureBlockState { const styles: Styles = { chip: { fontSize: 13, - backgroundColor: colors.lightBlueA700, color: colors.white, height: 11, borderRadius: 14, @@ -51,6 +50,7 @@ export class SignatureBlock extends React.Component !_.isEmpty(p.name))); return (
} {method.parameters && - !_.isEmpty(method.parameters) && ( + !_.isEmpty(method.parameters) && + onlyHasNamedParameters && (

ARGUMENTS

- {this._renderParameterDescriptions(method.parameters)} + {this._renderParameterDescriptions(method.parameters, method.name)}
)} {method.returnComment && ( -- cgit v1.2.3