aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-09-28 06:00:25 +0800
committerFabio Berger <me@fabioberger.com>2018-09-28 06:00:25 +0800
commit17d4b467d468d997867843361ed623b6edb0a768 (patch)
treedd28ba33f1737d0e3e7b5f1bc2d9d647d2e7efe3 /packages
parentac878d8fdbace787c7ffbc0fe68dd404d72452e3 (diff)
downloaddexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar.gz
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar.bz2
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar.lz
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar.xz
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.tar.zst
dexon-sol-tools-17d4b467d468d997867843361ed623b6edb0a768.zip
Only show arguments if the params are named (i.e not generated getters)
Diffstat (limited to 'packages')
-rw-r--r--packages/react-docs/src/components/signature_block.tsx7
1 files 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<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 && (