ghost-portal/packages/ui-app/src/Available.tsx
Thibaut Sardan 797c12be3c
Account overview (#1163)
* starting point

* show all accounts

* edit and save a name but remains ugly

* actually don't use deriveStateFromProps

* fix AdressRow

* indentation

* upperCase

* bring back the index

* trim input

* change edition l&f

* lint

* cater for small screens

* address comments

* lint and alphabetical order

* allow viewing and editing tags

* better UX when tag editing and styling for no tags

* nonce refactoring and show balances

* crypto type

* styling balances

* use css grid

* fix address row and creator

* with buttons

* button styling

* locked tooltip

* edit button always visible

* nits cleanup

* lint

* address comments

* try to prevent jump on editing

* no jump when no tags

* tweak for tag jump

* forgot the useless spacer

* align AddressSummary childre top right

* fix key warning and nits

* CSS stuff to align things

* Fix merge gone wrong
2019-05-22 15:38:44 +02:00

36 lines
915 B
TypeScript

// Copyright 2017-2019 @polkadot/ui-app authors & contributors
// This software may be modified and distributed under the terms
// of the Apache-2.0 license. See the LICENSE file for details.
import { BareProps } from './types';
import React from 'react';
import { AccountId, AccountIndex, Address } from '@polkadot/types';
import { Available } from '@polkadot/ui-reactive';
import { classes } from './util';
export type Props = BareProps & {
label?: string,
params?: AccountId | AccountIndex | Address | string | Uint8Array | null
};
export default class AvailableDisplay extends React.PureComponent<Props> {
render () {
const { params, className, label, style } = this.props;
if (!params) {
return null;
}
return (
<Available
className={classes('ui--Available', className)}
label={label}
params={params}
style={style}
/>
);
}
}