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