mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-02 14:15:06 +01:00
badebe017f
* Add UnitInput component * Add CurrencyInput component * Add UserPreferencedCurrencyInput component * Add UserPreferencedCurrencyDisplay component * Add updatePreferences action * Add styles for CurrencyInput, CurrencyDisplay, and UnitInput * Update SettingsTab page with Primary Currency toggle * Refactor currency displays and inputs to use UserPreferenced displays and inputs * Add TokenInput component * Add UserPreferencedTokenInput component * Use TokenInput in the send screen * Fix unit tests * Fix e2e and integration tests * Remove send/CurrencyDisplay component * Replace diamond unicode character with Eth logo. Fix typos
72 lines
1.9 KiB
JavaScript
72 lines
1.9 KiB
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import classnames from 'classnames'
|
|
import Identicon from '../../../identicon'
|
|
|
|
const ConfirmPageContainerSummary = props => {
|
|
const {
|
|
action,
|
|
title,
|
|
titleComponent,
|
|
subtitle,
|
|
subtitleComponent,
|
|
hideSubtitle,
|
|
className,
|
|
identiconAddress,
|
|
nonce,
|
|
assetImage,
|
|
} = props
|
|
|
|
return (
|
|
<div className={classnames('confirm-page-container-summary', className)}>
|
|
<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 || subtitle }
|
|
</div>
|
|
}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
ConfirmPageContainerSummary.propTypes = {
|
|
action: PropTypes.string,
|
|
title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
titleComponent: PropTypes.node,
|
|
subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
subtitleComponent: PropTypes.node,
|
|
hideSubtitle: PropTypes.bool,
|
|
className: PropTypes.string,
|
|
identiconAddress: PropTypes.string,
|
|
nonce: PropTypes.string,
|
|
assetImage: PropTypes.string,
|
|
}
|
|
|
|
export default ConfirmPageContainerSummary
|