From a986ca82854adcc09672e0036dff94c716da128f Mon Sep 17 00:00:00 2001 From: Bhanu Teja P Date: Fri, 31 May 2019 19:41:48 +0530 Subject: [PATCH] Display extrinsic meta documentation on hover (#1247) * add help to Extrinsic component * chain state documentation * requested changes --- packages/app-storage/src/Selection/Modules.tsx | 6 +++++- packages/ui-app/src/Extrinsic.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/app-storage/src/Selection/Modules.tsx b/packages/app-storage/src/Selection/Modules.tsx index bbcd8b8061..cc37191d5a 100644 --- a/packages/app-storage/src/Selection/Modules.tsx +++ b/packages/app-storage/src/Selection/Modules.tsx @@ -46,7 +46,7 @@ class Modules extends TxComponent { render () { const { t } = this.props; - const { isValid, key: { method, section }, params } = this.state; + const { isValid, key: { method, section, meta }, params } = this.state; return (
@@ -55,6 +55,10 @@ class Modules extends TxComponent { defaultValue={this.defaultValue} label={t('selected state query')} onChange={this.onChangeKey} + help={ + meta && meta.documentation + && meta.documentation.join(' ') + } /> { render () { const { defaultValue, isDisabled, isError, isPrivate, label, onEnter, withLabel } = this.props; - const { methodfn: { method, section }, params } = this.state; + const { methodfn: { method, section, meta }, params } = this.state; return (
@@ -61,6 +61,10 @@ class ExtrinsicDisplay extends React.PureComponent { label={label} onChange={this.onChangeMethod} withLabel={withLabel} + help={ + meta && meta.documentation + && meta.documentation.join(' ') + } />