diff options
Diffstat (limited to 'ui/app/components/transaction-status')
-rw-r--r-- | ui/app/components/transaction-status/index.scss | 7 | ||||
-rw-r--r-- | ui/app/components/transaction-status/transaction-status.component.js | 12 |
2 files changed, 16 insertions, 3 deletions
diff --git a/ui/app/components/transaction-status/index.scss b/ui/app/components/transaction-status/index.scss index 35be550f7..26a1f5d38 100644 --- a/ui/app/components/transaction-status/index.scss +++ b/ui/app/components/transaction-status/index.scss @@ -25,4 +25,9 @@ background-color: #FFF2DB; color: #CA810A; } -}
\ No newline at end of file + + &--failed { + background: lighten($monzo, 56%); + color: $monzo; + } +} diff --git a/ui/app/components/transaction-status/transaction-status.component.js b/ui/app/components/transaction-status/transaction-status.component.js index a4c827ae8..c22baf18a 100644 --- a/ui/app/components/transaction-status/transaction-status.component.js +++ b/ui/app/components/transaction-status/transaction-status.component.js @@ -1,6 +1,7 @@ import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' +import Tooltip from '../tooltip-v2' import { UNAPPROVED_STATUS, REJECTED_STATUS, @@ -29,6 +30,10 @@ const statusToTextHash = { } export default class TransactionStatus extends PureComponent { + static defaultProps = { + title: null, + } + static contextTypes = { t: PropTypes.func, } @@ -36,15 +41,18 @@ export default class TransactionStatus extends PureComponent { static propTypes = { statusKey: PropTypes.string, className: PropTypes.string, + title: PropTypes.string, } render () { - const { className, statusKey } = this.props + const { className, statusKey, title } = this.props const statusText = this.context.t(statusToTextHash[statusKey] || statusKey) return ( <div className={classnames('transaction-status', className, statusToClassNameHash[statusKey])}> - { statusText } + <Tooltip position="top" title={title}> + { statusText } + </Tooltip> </div> ) } |