ghost-portal/packages/ui-app/src/AddressRow.tsx
Jaco Greeff 4d984d9f72
Introduce higher-level ApiObservables, use stakingBalance displays (#210)
* 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
2018-08-08 14:57:09 +02:00

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);