diff --git a/packages/app-accounts/src/Creator.tsx b/packages/app-accounts/src/Creator.tsx index 67618a6d7f..533608a1ca 100644 --- a/packages/app-accounts/src/Creator.tsx +++ b/packages/app-accounts/src/Creator.tsx @@ -10,7 +10,6 @@ import Button from '@polkadot/ui-app/Button'; import Input from '@polkadot/ui-app/Input'; import { InputAddress } from '@polkadot/ui-app/InputAddress'; import Password from '@polkadot/ui-app/Password'; -import classes from '@polkadot/ui-app/util/classes'; import keyring from '@polkadot/ui-keyring/index'; import isHex from '@polkadot/util/is/hex'; import hexToU8a from '@polkadot/util/hex/toU8a'; @@ -62,14 +61,10 @@ class Creator extends React.PureComponent { } render () { - const { className, style } = this.props; const { address, isSeedValid } = this.state; return ( -
+
{ } render () { - const { className, style } = this.props; - return ( -
+
{this.renderData()} {this.renderButtons()}
diff --git a/packages/app-accounts/src/index.tsx b/packages/app-accounts/src/index.tsx index 69c31c3018..4f8a553585 100644 --- a/packages/app-accounts/src/index.tsx +++ b/packages/app-accounts/src/index.tsx @@ -9,7 +9,6 @@ import './index.css'; import React from 'react'; import Button from '@polkadot/ui-app/Button'; -import classes from '@polkadot/ui-app/util/classes'; import Creator from './Creator'; import Editor from './Editor'; @@ -35,15 +34,12 @@ class AccountsApp extends React.PureComponent { state: State = { action: 'edit' }; render () { - const { className, style, t } = this.props; + const { t } = this.props; const { action } = this.state; const Component = Components[action]; return ( -
+
, + this.renderExtrinsics(), + this.renderJustification() + ]; } private renderExtrinsics () { @@ -56,7 +55,7 @@ class BlockByHash extends React.PureComponent { const { extrinsics } = chainGetBlock; return ( -
+

{t('block.extrinsics', { defaultValue: 'extrinsics' })}

@@ -66,7 +65,7 @@ class BlockByHash extends React.PureComponent { className='explorer--BlockByHash-extrinsic' key={`${value}:extrinsic:${index}`} > - +
{extrinsic.extrinsic.section}.{extrinsic.extrinsic.name} @@ -85,11 +84,11 @@ class BlockByHash extends React.PureComponent {
- +
))}
-
+ ); } @@ -98,7 +97,7 @@ class BlockByHash extends React.PureComponent { const { justification } = chainGetBlock; return ( -
+

{t('block.justifications', { defaultValue: 'justifications' })}

@@ -116,7 +115,7 @@ class BlockByHash extends React.PureComponent {
))}
-
+ ); } } diff --git a/packages/app-explorer/src/BlockHeader/index.tsx b/packages/app-explorer/src/BlockHeader/index.tsx index 4e3c03e9f5..d556ad8809 100644 --- a/packages/app-explorer/src/BlockHeader/index.tsx +++ b/packages/app-explorer/src/BlockHeader/index.tsx @@ -11,7 +11,6 @@ import './BlockHeader.css'; import React from 'react'; import { Link } from 'react-router-dom'; import headerHash from '@polkadot/primitives/codec/header/hash'; -import classes from '@polkadot/ui-app/util/classes'; import numberFormat from '@polkadot/ui-react-rx/util/numberFormat'; import withApi from '@polkadot/ui-react-rx/with/api'; import u8aToHex from '@polkadot/util/u8a/toHex'; @@ -26,7 +25,7 @@ type Props = ApiProps & BareProps & { class BlockHeader extends React.PureComponent { render () { - const { apiMethods, className, value, style, withExtrinsics = false, withLink = false } = this.props; + const { apiMethods, value, withExtrinsics = false, withLink = false } = this.props; if (!value) { return null; @@ -40,10 +39,7 @@ class BlockHeader extends React.PureComponent { const parentHex = u8aToHex(parentHash); return ( -
+
{numberFormat(number)}
diff --git a/packages/app-explorer/src/index.css b/packages/app-explorer/src/index.css index fa4bfb2cb7..b026d35766 100644 --- a/packages/app-explorer/src/index.css +++ b/packages/app-explorer/src/index.css @@ -30,11 +30,6 @@ text-align: right; } -.explorer--BlockByHash-extrinsics, -.explorer--BlockByHash-justification { - margin-top: 2em; -} - .explorer--BlockByHash-flexable { display: flex; flex-wrap: wrap; diff --git a/packages/app-explorer/src/index.tsx b/packages/app-explorer/src/index.tsx index c48a843070..6938723d24 100644 --- a/packages/app-explorer/src/index.tsx +++ b/packages/app-explorer/src/index.tsx @@ -8,7 +8,6 @@ import './index.css'; import React from 'react'; import { Route, Switch } from 'react-router'; -import classes from '@polkadot/ui-app/util/classes'; import BlockByHash from './BlockByHash'; import Main from './Main'; @@ -19,13 +18,8 @@ type Props = BareProps & { export default class ExplorerApp extends React.Component { render () { - const { className, style } = this.props; - return ( -
+
diff --git a/packages/app-extrinsics/src/Account.tsx b/packages/app-extrinsics/src/Account.tsx index 59bdd94349..d4a71e4cc6 100644 --- a/packages/app-extrinsics/src/Account.tsx +++ b/packages/app-extrinsics/src/Account.tsx @@ -9,7 +9,6 @@ import React from 'react'; import InputAddress from '@polkadot/ui-app/InputAddress'; import Labelled from '@polkadot/ui-app/Labelled'; -import classes from '@polkadot/ui-app/util/classes'; import Balance from '@polkadot/ui-react-rx/Balance'; import translate from './translate'; @@ -41,13 +40,10 @@ class Account extends React.PureComponent { } render () { - const { className, defaultValue, isDisabled, isError, isInput, label, style, type, withLabel } = this.props; + const { defaultValue, isDisabled, isError, isInput, label, type, withLabel } = this.props; return ( -
+
{ } render () { - const { className, defaultValue, isDisabled, isError, isPrivate, labelMethod, labelSection, style, withLabel } = this.props; + const { defaultValue, isDisabled, isError, isPrivate, labelMethod, labelSection, withLabel } = this.props; const { extrinsic } = this.state; return ( -
+
{ render () { - const { className, label, style, rxChange, value } = this.props; + const { label, rxChange, value } = this.props; if (!value) { return null; } return ( -
+
{ } as State; render () { - const { className, style, t } = this.props; + const { t } = this.props; const { publicKey, isValid } = this.state; return ( -
+
{ render () { - const { className, style } = this.props; - return ( -
+
{({ queueAdd }: QueueProps) => ( diff --git a/packages/app-rpc/src/Account.tsx b/packages/app-rpc/src/Account.tsx index 54dbf008ab..849d16ee43 100644 --- a/packages/app-rpc/src/Account.tsx +++ b/packages/app-rpc/src/Account.tsx @@ -9,7 +9,6 @@ import React from 'react'; import InputAddress from '@polkadot/ui-app/InputAddress'; import Labelled from '@polkadot/ui-app/Labelled'; -import classes from '@polkadot/ui-app/util/classes'; import Nonce from '@polkadot/ui-react-rx/Nonce'; import translate from './translate'; @@ -38,13 +37,10 @@ class Account extends React.PureComponent { } render () { - const { className, defaultValue, isError, style, t } = this.props; + const { defaultValue, isError, t } = this.props; return ( -
+
{ render () { - const { className, queue = [], style } = this.props; + const { queue = [] } = this.props; const filtered = queue .filter(({ error, result }) => @@ -31,10 +30,7 @@ export default class Results extends React.PureComponent { } return ( -
+
{filtered.map(({ error, id, result, rpc: { section, name } }) => ( { } /> ))} -
+ ); } } diff --git a/packages/app-rpc/src/Selection.tsx b/packages/app-rpc/src/Selection.tsx index fc15e0219c..2f74f87f8c 100644 --- a/packages/app-rpc/src/Selection.tsx +++ b/packages/app-rpc/src/Selection.tsx @@ -12,12 +12,10 @@ import './index.css'; import BN from 'bn.js'; import React from 'react'; - import rpc from '@polkadot/jsonrpc'; import Button from '@polkadot/ui-app/Button'; import InputRpc from '@polkadot/ui-app/InputRpc'; import Params from '@polkadot/ui-app/Params'; -import classes from '@polkadot/ui-app/util/classes'; import rawToValues from '@polkadot/ui-signer/rawToValues'; import Account from './Account'; @@ -47,14 +45,11 @@ class Selection extends React.PureComponent { }; render () { - const { className, style, t } = this.props; + const { t } = this.props; const { isValid, rpc } = this.state; return ( -
+
{ })} /> -
+ ); } diff --git a/packages/app-rpc/src/index.tsx b/packages/app-rpc/src/index.tsx index 18bfe8d993..3e75009ae3 100644 --- a/packages/app-rpc/src/index.tsx +++ b/packages/app-rpc/src/index.tsx @@ -8,7 +8,6 @@ import { QueueProps } from '@polkadot/ui-signer/types'; import './index.css'; import React from 'react'; -import classes from '@polkadot/ui-app/util/classes'; import { QueueConsumer } from '@polkadot/ui-signer/Context'; import Results from './Results'; @@ -20,13 +19,8 @@ type Props = BareProps & { export default class RpcApp extends React.PureComponent { render () { - const { className, style } = this.props; - return ( -
+
{({ queue, queueAdd }: QueueProps) => [ { } render () { - const { address, className, intentions, isValidator, name, style } = this.props; + const { address, intentions, isValidator, name } = this.props; const { isNominateOpen } = this.state; return ( - +
{ {this.renderNominators()}
- + ); } diff --git a/packages/app-staking/src/Nominating.tsx b/packages/app-staking/src/Nominating.tsx index 310fdbce5d..cb83abaa45 100644 --- a/packages/app-staking/src/Nominating.tsx +++ b/packages/app-staking/src/Nominating.tsx @@ -9,7 +9,6 @@ import React from 'react'; import Button from '@polkadot/ui-app/Button'; import Input from '@polkadot/ui-app/Input'; import Modal from '@polkadot/ui-app/Modal'; -import classes from '@polkadot/ui-app/util/classes'; import translate from './translate'; @@ -38,7 +37,7 @@ class Nominating extends React.PureComponent { } render () { - const { className, isOpen, style } = this.props; + const { isOpen, style } = this.props; if (!isOpen) { return null; @@ -46,7 +45,7 @@ class Nominating extends React.PureComponent { return ( { render () { - const { balances, className, intentions, style, validators } = this.props; + const { balances, intentions, validators } = this.props; return ( {({ queueExtrinsic }: QueueProps) => ( -
+
{keyring.getAccounts().map((account) => { const address = account.address(); const name = account.getMeta().name || ''; diff --git a/packages/app-staking/src/UnnominateButton.tsx b/packages/app-staking/src/UnnominateButton.tsx index d02f88b946..6b26059264 100644 --- a/packages/app-staking/src/UnnominateButton.tsx +++ b/packages/app-staking/src/UnnominateButton.tsx @@ -6,7 +6,6 @@ import { I18nProps } from '@polkadot/ui-app/types'; import React from 'react'; import Button from '@polkadot/ui-app/Button'; -import classes from '@polkadot/ui-app/util/classes'; import withMulti from '@polkadot/ui-react-rx/with/multi'; import withObservable from '@polkadot/ui-react-rx/with/observable'; @@ -21,7 +20,7 @@ type Props = I18nProps & { class UnnominateButton extends React.Component { render () { - const { className, nominating, stakingNominatorsFor, style, t } = this.props; + const { nominating, stakingNominatorsFor, style, t } = this.props; if (!nominating || !stakingNominatorsFor || stakingNominatorsFor.length === 0) { return null; @@ -29,7 +28,7 @@ class UnnominateButton extends React.Component { return (