A Metamask fork with Infura removed and default networks editable
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ciphermask/ui/components/app/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summ...

69 lines
1.9 KiB

import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import Identicon from '../../../../ui/identicon';
const ConfirmPageContainerSummary = (props) => {
const {
action,
title,
titleComponent,
subtitleComponent,
hideSubtitle,
className,
identiconAddress,
nonce,
assetImage,
origin,
} = props;
return (
<div className={classnames('confirm-page-container-summary', className)}>
{origin === 'metamask' ? null : (
<div className="confirm-page-container-summary__origin">{origin}</div>
)}
<div className="confirm-page-container-summary__action-row">
<div className="confirm-page-container-summary__action">{action}</div>
{nonce && (
<div className="confirm-page-container-summary__nonce">
{`#${nonce}`}
</div>
)}
</div>
<div className="confirm-page-container-summary__title">
{identiconAddress && (
<Identicon
className="confirm-page-container-summary__identicon"
diameter={36}
address={identiconAddress}
image={assetImage}
/>
)}
<div className="confirm-page-container-summary__title-text">
{titleComponent || title}
</div>
</div>
{hideSubtitle || (
<div className="confirm-page-container-summary__subtitle">
{subtitleComponent}
</div>
)}
</div>
);
};
ConfirmPageContainerSummary.propTypes = {
action: PropTypes.string,
title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
titleComponent: PropTypes.node,
subtitleComponent: PropTypes.node,
hideSubtitle: PropTypes.bool,
className: PropTypes.string,
identiconAddress: PropTypes.string,
nonce: PropTypes.string,
assetImage: PropTypes.string,
origin: PropTypes.string.isRequired,
};
export default ConfirmPageContainerSummary;