aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/confirm-page-container
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-09-16 14:50:17 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-09-20 05:31:10 +0800
commit44d4b5b5db021646ca26026d91ab2ef39153af37 (patch)
tree0dd83a45dfca49c1d9f7ac3c0864229a8f89d1f4 /ui/app/components/confirm-page-container
parent3c3fed46cb032f59cd30daae04c17475196cd5c9 (diff)
downloadtangerine-wallet-browser-44d4b5b5db021646ca26026d91ab2ef39153af37.tar.gz
tangerine-wallet-browser-44d4b5b5db021646ca26026d91ab2ef39153af37.tar.zst
tangerine-wallet-browser-44d4b5b5db021646ca26026d91ab2ef39153af37.zip
Refactor ConfirmPageContainerError to ErrorMessage
Diffstat (limited to 'ui/app/components/confirm-page-container')
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-content.component.js9
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js30
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.js1
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.scss21
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/index.js1
-rw-r--r--ui/app/components/confirm-page-container/confirm-page-container-content/index.scss2
6 files changed, 3 insertions, 61 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
index de9aa6eb7..74e95ece6 100644
--- 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
@@ -2,11 +2,8 @@ import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames'
import { Tabs, Tab } from '../../tabs'
-import {
- ConfirmPageContainerSummary,
- ConfirmPageContainerError,
- ConfirmPageContainerWarning,
-} from './'
+import { ConfirmPageContainerSummary, ConfirmPageContainerWarning } from './'
+import ErrorMessage from '../../error-message'
export default class ConfirmPageContainerContent extends Component {
static propTypes = {
@@ -95,7 +92,7 @@ export default class ConfirmPageContainerContent extends Component {
{
(errorKey || errorMessage) && (
<div className="confirm-page-container-content__error-container">
- <ConfirmPageContainerError
+ <ErrorMessage
errorMessage={errorMessage}
errorKey={errorKey}
/>
diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js
deleted file mode 100644
index 4965d7b4e..000000000
--- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/confirm-page-container-error.component.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-
-const ConfirmPageContainerError = (props, context) => {
- const { errorMessage, errorKey } = props
- const error = errorKey ? context.t(errorKey) : errorMessage
-
- return (
- <div className="confirm-page-container-error">
- <img
- src="/images/alert-red.svg"
- className="confirm-page-container-error__icon"
- />
- <div className="confirm-page-container-error__text">
- { `ALERT: ${error}` }
- </div>
- </div>
- )
-}
-
-ConfirmPageContainerError.propTypes = {
- errorMessage: PropTypes.string,
- errorKey: PropTypes.string,
-}
-
-ConfirmPageContainerError.contextTypes = {
- t: PropTypes.func,
-}
-
-export default ConfirmPageContainerError
diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.js b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.js
deleted file mode 100644
index 4ac95d0e3..000000000
--- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.js
+++ /dev/null
@@ -1 +0,0 @@
-export { default } from './confirm-page-container-error.component'
diff --git a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.scss b/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.scss
deleted file mode 100644
index 89ff25578..000000000
--- a/ui/app/components/confirm-page-container/confirm-page-container-content/confirm-page-container-error/index.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-.confirm-page-container-error {
- min-height: 32px;
- border: 1px solid $monzo;
- color: $monzo;
- background: lighten($monzo, 56%);
- border-radius: 4px;
- font-size: .75rem;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- padding: 8px 16px;
-
- &__icon {
- margin-right: 8px;
- flex: 0 0 auto;
- }
-
- &__text {
- overflow: auto;
- }
-}
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
index 1469dd438..4dfd89d92 100644
--- 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
@@ -1,4 +1,3 @@
export { default } from './confirm-page-container-content.component'
export { default as ConfirmPageContainerSummary } from './confirm-page-container-summary'
-export { default as ConfirmPageContainerError } from './confirm-page-container-error'
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
index 39797a43f..698e624f4 100644
--- 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
@@ -1,5 +1,3 @@
-@import './confirm-page-container-error/index';
-
@import './confirm-page-container-warning/index';
@import './confirm-page-container-summary/index';