From 17d4b467d468d997867843361ed623b6edb0a768 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
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(-)

(limited to 'packages/react-docs/src/components/signature_block.tsx')

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<SignatureBlockProps, Signatu
         const method = this.props.method;
 
         const isFallback = (method as SolidityMethod).isFallback;
+        const onlyHasNamedParameters = !_.isUndefined(_.find(method.parameters, p => !_.isEmpty(p.name)));
         return (
             <div
                 id={`${this.props.sectionName}-${method.name}`}
@@ -98,12 +98,13 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu
                 )}
                 {method.comment && <Comment comment={method.comment} className="py2" />}
                 {method.parameters &&
-                    !_.isEmpty(method.parameters) && (
+                    !_.isEmpty(method.parameters) &&
+                    onlyHasNamedParameters && (
                         <div>
                             <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}>
                                 ARGUMENTS
                             </h4>
-                            {this._renderParameterDescriptions(method.parameters)}
+                            {this._renderParameterDescriptions(method.parameters, method.name)}
                         </div>
                     )}
                 {method.returnComment && (
-- 
cgit v1.2.3

