Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: MIT
import React from 'react';
import Blockies from 'react-blockies';
import PropTypes from 'prop-types';
import Card from '../Card';
import Placeholder from '../Placeholder';
const AccountCard = ({ address, name, ...otherProps }) => (
<Card {...otherProps}>
<div className='account'>
<div className='account_avatar'>
{address ? (
<Blockies seed={address.toLowerCase()} />
) : (
<Placeholder height={36} width={36} />
)}
</div>
<div className='account_information'>
{name ? (
<div className='account_name'>{name}</div>
) : (
<Placeholder height={18} width={100} />
)}
<div className='account_address'>
{address || <Placeholder height={14} width={150} />}
</div>
</div>
</div>
</Card>
);
AccountCard.propTypes = {
address: PropTypes.string,
name: PropTypes.string
};
export default AccountCard;