Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
import React from 'react';
import PropTypes from 'prop-types';
Luke Schoen
committed
import { Address } from '../AccountCard/Address';
import { Avatar } from '../AccountCard/Avatar';
Luke Schoen
committed
import { Information } from '../AccountCard/Information';
import { Name } from '../AccountCard/Name';
import { ClickToCopy } from '../ClickToCopy';
import { Header } from '../Header';
const NormalContainer = ({ children }) => (
<h1 className='account -header'>{children}</h1>
);
const CopyContainer = ({ address, children, ...otherProps }) => (
<ClickToCopy label='Copy address' textToCopy={address} {...otherProps}>
<Clickable className='account -header'>{children}</Clickable>
export const AccountHeader = ({
address,
copyAddress,
name,
const Container = copyAddress ? CopyContainer : NormalContainer;
return (
<div>
<Header
Luke Schoen
committed
screen='tokens'
Luke Schoen
committed
<Container address={address} className='account'>
Luke Schoen
committed
<Avatar address={address} scale={4} type={type} />
<Information>
<Name name={name} />
<Address address={address} short />
</Information>