aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/pages/documentation/method_signature.tsx
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-02-16 14:56:19 +0800
committerFabio Berger <me@fabioberger.com>2018-02-16 14:56:19 +0800
commit9349752baa3d17b8c8d25eec0c4594f1f547fceb (patch)
tree05868fdc7f160d860f4d4cfc8727cac359ed564c /packages/website/ts/pages/documentation/method_signature.tsx
parent974fab72844d51314f726316d25161e1a8c14cc1 (diff)
downloaddexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar.gz
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar.bz2
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar.lz
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar.xz
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.tar.zst
dexon-sol-tools-9349752baa3d17b8c8d25eec0c4594f1f547fceb.zip
Add hack comment explaining param count short-cut
Diffstat (limited to 'packages/website/ts/pages/documentation/method_signature.tsx')
-rw-r--r--packages/website/ts/pages/documentation/method_signature.tsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/website/ts/pages/documentation/method_signature.tsx b/packages/website/ts/pages/documentation/method_signature.tsx
index f94524b48..22294e428 100644
--- a/packages/website/ts/pages/documentation/method_signature.tsx
+++ b/packages/website/ts/pages/documentation/method_signature.tsx
@@ -24,6 +24,9 @@ export const MethodSignature: React.SFC<MethodSignatureProps> = (props: MethodSi
const sectionName = constants.TYPES_SECTION_NAME;
const parameters = renderParameters(props.method, props.docsInfo, sectionName, props.typeDefinitionByName);
const paramStringArray: any[] = [];
+ // HACK: For now we don't put params on newlines if there are less then 2 of them.
+ // Ideally we would check the character length of the resulting method signature and
+ // if it exceeds the available space, put params on their own lines.
const hasMoreThenTwoParams = parameters.length > 2;
_.each(parameters, (param: React.ReactNode, i: number) => {
const finalParam = hasMoreThenTwoParams ? (