diff options
Diffstat (limited to 'ui/app/components/confirm-page-container/confirm-page-container-content')
9 files changed, 0 insertions, 348 deletions
diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js deleted file mode 100644 index 1dca81560..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js +++ /dev/null @@ -1,110 +0,0 @@ -import React, { Component } from 'react' -import PropTypes from 'prop-types' -import classnames from 'classnames' -import { Tabs, Tab } from '../../tabs' -import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from './' -import ErrorMessage from '../../error-message' - -export default class ConfirmPageContainerContent extends Component { - static propTypes = { - action: PropTypes.string, - dataComponent: PropTypes.node, - detailsComponent: PropTypes.node, - errorKey: PropTypes.string, - errorMessage: PropTypes.string, - hideSubtitle: PropTypes.bool, - identiconAddress: PropTypes.string, - nonce: PropTypes.string, - assetImage: PropTypes.string, - subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - subtitleComponent: PropTypes.node, - summaryComponent: PropTypes.node, - title: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), - titleComponent: PropTypes.node, - warning: PropTypes.string, - } - - renderContent () { - const { detailsComponent, dataComponent } = this.props - - if (detailsComponent && dataComponent) { - return this.renderTabs() - } else { - return detailsComponent || dataComponent - } - } - - renderTabs () { - const { detailsComponent, dataComponent } = this.props - - return ( - <Tabs> - <Tab name="Details"> - { detailsComponent } - </Tab> - <Tab name="Data"> - { dataComponent } - </Tab> - </Tabs> - ) - } - - render () { - const { - action, - errorKey, - errorMessage, - title, - titleComponent, - subtitle, - subtitleComponent, - hideSubtitle, - identiconAddress, - nonce, - assetImage, - summaryComponent, - detailsComponent, - dataComponent, - warning, - } = this.props - - return ( - <div className="confirm-page-container-content"> - { - warning && ( - <ConfirmPageContainerWarning warning={warning} /> - ) - } - { - summaryComponent || ( - <ConfirmPageContainerSummary - className={classnames({ - 'confirm-page-container-summary--border': !detailsComponent || !dataComponent, - })} - action={action} - title={title} - titleComponent={titleComponent} - subtitle={subtitle} - subtitleComponent={subtitleComponent} - hideSubtitle={hideSubtitle} - identiconAddress={identiconAddress} - nonce={nonce} - assetImage={assetImage} - /> - ) - } - { this.renderContent() } - { - (errorKey || errorMessage) && ( - <div className="confirm-page-container-content__error-container"> - <ErrorMessage - errorMessage={errorMessage} - errorKey={errorKey} - /> - </div> - ) - } - </div> - ) - } -} diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js deleted file mode 100644 index 89ceb015f..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/confirm-page-container-summary.component.js +++ /dev/null @@ -1,71 +0,0 @@ -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 diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js deleted file mode 100644 index ed1b28cf2..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-page-container-summary.component' diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss deleted file mode 100644 index 7f0f5d37a..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-summary/index.scss +++ /dev/null @@ -1,54 +0,0 @@ -.confirm-page-container-summary { - padding: 16px 24px 0; - background-color: #f9fafa; - height: 133px; - box-sizing: border-box; - - &__action-row { - display: flex; - justify-content: space-between; - } - - &__action { - text-transform: uppercase; - color: $oslo-gray; - font-size: .75rem; - padding: 3px 8px; - border: 1px solid $oslo-gray; - border-radius: 4px; - display: inline-block; - } - - &__nonce { - color: $oslo-gray; - } - - &__title { - padding: 4px 0; - display: flex; - align-items: center; - } - - &__identicon { - flex: 0 0 auto; - margin-right: 8px; - } - - &__title-text { - font-size: 2.25rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - &__subtitle { - color: $oslo-gray; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - &--border { - border-bottom: 1px solid $geyser; - } -} diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js deleted file mode 100644 index 79901c8fc..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/confirm-page-container-warning.component.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' - -const ConfirmPageContainerWarning = props => { - return ( - <div className="confirm-page-container-warning"> - <img - className="confirm-page-container-warning__icon" - src="/images/alert.svg" - /> - <div className="confirm-page-container-warning__warning"> - { props.warning } - </div> - </div> - ) -} - -ConfirmPageContainerWarning.propTypes = { - warning: PropTypes.string, -} - -export default ConfirmPageContainerWarning diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js deleted file mode 100644 index 6e48bd144..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './confirm-page-container-warning.component' diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss deleted file mode 100644 index 50545a1a2..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-warning/index.scss +++ /dev/null @@ -1,18 +0,0 @@ -.confirm-page-container-warning { - background-color: #fffcdb; - display: flex; - justify-content: center; - align-items: center; - border-bottom: 1px solid $geyser; - padding: 12px 24px; - - &__icon { - flex: 0 0 auto; - margin-right: 16px; - } - - &__warning { - font-size: .75rem; - color: #5f5922; - } -} diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/index.js b/ui/app/components/confirm-page-container/confirm-page-container-content/index.js deleted file mode 100644 index 4dfd89d92..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export { default } from './confirm-page-container-content.component' -export { default as ConfirmPageContainerSummary } from './confirm-page-container-summary' -export { default as ConfirmPageContainerWarning } from './confirm-page-container-warning' diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/index.scss b/ui/app/components/confirm-page-container/confirm-page-container-content/index.scss deleted file mode 100644 index 78639a435..000000000 --- a/ui/app/components/confirm-page-container/confirm-page-container-content/index.scss +++ /dev/null @@ -1,68 +0,0 @@ -@import './confirm-page-container-warning/index'; - -@import './confirm-page-container-summary/index'; - -.confirm-page-container-content { - overflow-y: auto; - flex: 1; - - &__error-container { - padding: 0 16px 16px 16px; - } - - &__details { - box-sizing: border-box; - padding: 0 24px; - } - - &__data { - padding: 16px; - color: $oslo-gray; - } - - &__data-box { - background-color: #f9fafa; - padding: 12px; - font-size: .75rem; - margin-bottom: 16px; - word-wrap: break-word; - max-height: 200px; - overflow-y: auto; - - &-label { - text-transform: uppercase; - padding: 8px 0 12px; - font-size: 12px; - } - } - - &__data-field { - display: flex; - flex-direction: row; - - &-label { - font-weight: 500; - padding-right: 16px; - } - - &:not(:last-child) { - margin-bottom: 5px; - } - } - - &__gas-fee { - border-bottom: 1px solid $geyser; - - .advanced-gas-inputs__gas-edit-rows { - margin-bottom: 16px; - } - } - - &__function-type { - font-size: .875rem; - font-weight: 500; - text-transform: capitalize; - color: $black; - padding-left: 5px; - } -} |