Display extrinsic meta documentation on hover (#1247)
* add help to Extrinsic component * chain state documentation * requested changes
This commit is contained in:
parent
b39144d1d3
commit
a986ca8285
@ -46,7 +46,7 @@ class Modules extends TxComponent<Props, State> {
|
||||
|
||||
render () {
|
||||
const { t } = this.props;
|
||||
const { isValid, key: { method, section }, params } = this.state;
|
||||
const { isValid, key: { method, section, meta }, params } = this.state;
|
||||
|
||||
return (
|
||||
<section className='storage--actionrow'>
|
||||
@ -55,6 +55,10 @@ class Modules extends TxComponent<Props, State> {
|
||||
defaultValue={this.defaultValue}
|
||||
label={t('selected state query')}
|
||||
onChange={this.onChangeKey}
|
||||
help={
|
||||
meta && meta.documentation
|
||||
&& meta.documentation.join(' ')
|
||||
}
|
||||
/>
|
||||
<Params
|
||||
key={`${section}.${method}:params` /* force re-render on change */}
|
||||
|
||||
@ -49,7 +49,7 @@ class ExtrinsicDisplay extends React.PureComponent<Props, State> {
|
||||
|
||||
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 (
|
||||
<div className='extrinsics--Extrinsic'>
|
||||
@ -61,6 +61,10 @@ class ExtrinsicDisplay extends React.PureComponent<Props, State> {
|
||||
label={label}
|
||||
onChange={this.onChangeMethod}
|
||||
withLabel={withLabel}
|
||||
help={
|
||||
meta && meta.documentation
|
||||
&& meta.documentation.join(' ')
|
||||
}
|
||||
/>
|
||||
<Params
|
||||
key={`${section}.${method}:params` /* force re-render on change */}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user