// Copyright 2015-2018 Parity Technologies (UK) Ltd. // This file is part of Parity. // // SPDX-License-Identifier: BSD-3-Clause import React from 'react'; import PropTypes from 'prop-types'; import { Address } from '../AccountCard/Address'; import { Avatar } from '../AccountCard/Avatar'; import { Information } from '../AccountCard/Information'; import { Name } from '../AccountCard/Name'; import { Clickable } from '../Clickable'; import { ClickToCopy } from '../ClickToCopy'; import { Header } from '../Header'; const NormalContainer = ({ children }) => (

{children}

); const CopyContainer = ({ address, children, ...otherProps }) => ( {children} ); export const AccountHeader = ({ address, copyAddress, name, type, ...otherProps }) => { const Container = copyAddress ? CopyContainer : NormalContainer; return (
) } {...otherProps} />
); }; AccountHeader.propTypes = { address: PropTypes.string, name: PropTypes.string };