diff --git a/packages/ui-app/src/Extrinsic.tsx b/packages/ui-app/src/Extrinsic.tsx index ec84aed53a..9fa331aa8a 100644 --- a/packages/ui-app/src/Extrinsic.tsx +++ b/packages/ui-app/src/Extrinsic.tsx @@ -61,10 +61,7 @@ class ExtrinsicDisplay extends React.PureComponent { label={label} onChange={this.onChangeMethod} withLabel={withLabel} - help={ - meta && meta.documentation - && meta.documentation.join(' ') - } + help={meta && meta.documentation && meta.documentation.join(' ')} /> { if (isValid) { try { method = methodfn( - ...values.map(({ value }) => - value - ) + ...values.map(({ value }) => value) ); } catch (error) { // swallow diff --git a/packages/ui-app/src/Params/Extrinsic.tsx b/packages/ui-app/src/Params/Extrinsic.tsx index 71d1c28fb5..71a6f93f3c 100644 --- a/packages/ui-app/src/Params/Extrinsic.tsx +++ b/packages/ui-app/src/Params/Extrinsic.tsx @@ -34,11 +34,7 @@ class ExtrinsicDisplay extends React.PureComponent { isDisabled={isDisabled} isError={isError} isPrivate={isPrivate} - label={t('{{label}} (extrinsic)', { - replace: { - label - } - })} + label={<>{label} {t('(extrinsic)')}} onChange={this.onChange} onEnter={onEnter} style={style} diff --git a/packages/ui-params/src/Param/index.tsx b/packages/ui-params/src/Param/index.tsx index 02b334907b..45b309b291 100644 --- a/packages/ui-params/src/Param/index.tsx +++ b/packages/ui-params/src/Param/index.tsx @@ -6,17 +6,12 @@ import { I18nProps } from '@polkadot/ui-app/types'; import { BaseProps, Props as ComponentProps, ComponentMap } from '../types'; import React from 'react'; -import styled from 'styled-components'; import { classes } from '@polkadot/ui-app/util'; import translate from '@polkadot/ui-app/translate'; import { isUndefined } from '@polkadot/util'; import findComponent from './findComponent'; -const Type = styled.span` - font-family: monospace; -`; - type Props = I18nProps & BaseProps & { isDisabled?: boolean, overrides?: ComponentMap @@ -55,11 +50,9 @@ class ParamComponent extends React.PureComponent { key={`${name}:${type}`} isDisabled={isDisabled} label={ - - {isUndefined(name) - ? type.type - : `${name}: ${type.type}`} - + isUndefined(name) + ? type.type + : `${name}: ${type.type}` } name={name} onChange={onChange} diff --git a/packages/ui-params/src/Params.css b/packages/ui-params/src/Params.css index 158878423f..144dc23a51 100644 --- a/packages/ui-params/src/Params.css +++ b/packages/ui-params/src/Params.css @@ -5,6 +5,10 @@ .ui--Params { border-left: 0.25rem solid #f2f2f2; + label { + font-family: monospace; + } + .ui--row { flex-wrap: wrap; }