* Move observables to ui-react-rx * Move observables into ApiObservable * Allow AddressSummary to render passed-in balance(s) * Render Balance consistently in summaries * Style Mini balance * Use ApiObservable via HOC * Nominee balances expanded * Render nominators for account * Add full balance when intending
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
// Copyright 2017-2018 @polkadot/ui-app authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the ISC license. See the LICENSE file for details.
|
|
|
|
import React from 'react';
|
|
|
|
import IdentityIcon from '@polkadot/ui-react/IdentityIcon';
|
|
|
|
import classes from './util/classes';
|
|
import { AddressSummary } from './AddressSummary';
|
|
import translate from './translate';
|
|
|
|
class AddressRow extends AddressSummary {
|
|
render () {
|
|
const { className, style } = this.props;
|
|
const { address, isValid } = this.state;
|
|
|
|
return (
|
|
<div
|
|
className={classes('ui--AddressRow', !isValid && 'invalid', className)}
|
|
style={style}
|
|
>
|
|
<div className='ui--AddressRow-base'>
|
|
<IdentityIcon
|
|
className='ui--AddressRow-icon'
|
|
size={96}
|
|
value={address}
|
|
/>
|
|
<div className='ui--AddressRow-details'>
|
|
{this.renderAddress()}
|
|
{this.renderBalance()}
|
|
{this.renderNonce()}
|
|
</div>
|
|
</div>
|
|
{this.renderChildren()}
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default translate(AddressRow);
|