embark/embark-ui/src/components/Account.js

31 lines
788 B
JavaScript
Raw Normal View History

2018-08-03 15:51:15 +00:00
import React from 'react';
2018-10-18 15:07:38 +00:00
import {Row, Col, Card, CardHeader, CardBody} from 'reactstrap';
2018-08-03 15:51:15 +00:00
import PropTypes from 'prop-types';
2018-10-17 12:24:57 +00:00
import Description from './Description';
2018-10-18 13:46:01 +00:00
import CardTitleIdenticon from './CardTitleIdenticon';
2018-10-17 12:24:57 +00:00
2018-08-03 15:51:15 +00:00
const Account = ({account}) => (
2018-10-15 10:08:57 +00:00
<Row>
<Col>
2018-10-18 13:46:01 +00:00
<Card>
<CardHeader>
<CardTitleIdenticon id={account.address}>Account {account.address}</CardTitleIdenticon>
</CardHeader>
<CardBody>
2018-10-18 18:28:33 +00:00
<dl className="row">
2018-10-18 13:46:01 +00:00
<Description label="Balance" value={account.balance} />
<Description label="Transaction count" value={account.transactionCount} />
</dl>
</CardBody>
</Card>
2018-10-15 10:08:57 +00:00
</Col>
</Row>
2018-08-03 15:51:15 +00:00
);
Account.propTypes = {
account: PropTypes.object
};
export default Account;