// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
// SPDX-License-Identifier: BSD-3-Clause
import React from 'react';
import Blockies from 'react-blockies';
import PropTypes from 'prop-types';
import ClickToCopy from '../ClickToCopy';
import Header from '../Header';
const NormalContainer = ({ children }) => (
{children}
);
const CopyContainer = ({ address, children, ...otherProps }) => (
{children}
);
const AccountHeader = ({ address, copyAddress, name, ...otherProps }) => {
const Container = copyAddress ? CopyContainer : NormalContainer;
return (
{' '}
{name}
{address}
)
}
{...otherProps}
/>
);
};
AccountHeader.propTypes = {
address: PropTypes.string,
name: PropTypes.string
};
export default AccountHeader;