parent
3c3fed46cb
commit
44d4b5b5db
@ -1 +0,0 @@ |
||||
export { default } from './confirm-page-container-error.component' |
@ -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' |
||||
|
@ -1,30 +1,30 @@ |
||||
import React from 'react' |
||||
import PropTypes from 'prop-types' |
||||
|
||||
const ConfirmPageContainerError = (props, context) => { |
||||
const ErrorMessage = (props, context) => { |
||||
const { errorMessage, errorKey } = props |
||||
const error = errorKey ? context.t(errorKey) : errorMessage |
||||
|
||||
return ( |
||||
<div className="confirm-page-container-error"> |
||||
<div className="error-message"> |
||||
<img |
||||
src="/images/alert-red.svg" |
||||
className="confirm-page-container-error__icon" |
||||
className="error-message__icon" |
||||
/> |
||||
<div className="confirm-page-container-error__text"> |
||||
<div className="error-message__text"> |
||||
{ `ALERT: ${error}` } |
||||
</div> |
||||
</div> |
||||
) |
||||
} |
||||
|
||||
ConfirmPageContainerError.propTypes = { |
||||
ErrorMessage.propTypes = { |
||||
errorMessage: PropTypes.string, |
||||
errorKey: PropTypes.string, |
||||
} |
||||
|
||||
ConfirmPageContainerError.contextTypes = { |
||||
ErrorMessage.contextTypes = { |
||||
t: PropTypes.func, |
||||
} |
||||
|
||||
export default ConfirmPageContainerError |
||||
export default ErrorMessage |
@ -0,0 +1 @@ |
||||
export { default } from './error-message.component' |
@ -1,4 +1,4 @@ |
||||
.confirm-page-container-error { |
||||
.error-message { |
||||
min-height: 32px; |
||||
border: 1px solid $monzo; |
||||
color: $monzo; |
Loading…
Reference in new issue