diff options
author | Esteban MiƱo <efmino@uc.cl> | 2019-01-24 02:09:56 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-24 02:09:56 +0800 |
commit | 2d7c9b3dacc08c3d308100894b14d8c9f971e775 (patch) | |
tree | ddb6de9b5d8e42a5a2bcaf7cde3bdcd62f4a666a /ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js | |
parent | fba17d77de9e60de0e02e90dc6dbcbbf7454158a (diff) | |
download | tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.tar.gz tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.tar.zst tangerine-wallet-browser-2d7c9b3dacc08c3d308100894b14d8c9f971e775.zip |
Prevent send to token warning (#6058)
Diffstat (limited to 'ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js')
-rw-r--r-- | ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js b/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js index 04f4f8a15..0146ce645 100644 --- a/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js +++ b/ui/app/components/send/send-content/send-row-wrapper/send-row-wrapper.component.js @@ -1,6 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import SendRowErrorMessage from './send-row-error-message/' +import SendRowWarningMessage from './send-row-warning-message/' export default class SendRowWrapper extends Component { @@ -9,6 +10,8 @@ export default class SendRowWrapper extends Component { errorType: PropTypes.string, label: PropTypes.string, showError: PropTypes.bool, + showWarning: PropTypes.bool, + warningType: PropTypes.string, }; static contextTypes = { @@ -21,8 +24,9 @@ export default class SendRowWrapper extends Component { errorType = '', label, showError = false, + showWarning = false, + warningType = '', } = this.props - const formField = Array.isArray(children) ? children[1] || children[0] : children const customLabelContent = children.length > 1 ? children[0] : null @@ -31,6 +35,7 @@ export default class SendRowWrapper extends Component { <div className="send-v2__form-label"> {label} {showError && <SendRowErrorMessage errorType={errorType}/>} + {!showError && showWarning && <SendRowWarningMessage warningType={warningType} />} {customLabelContent} </div> <div className="send-v2__form-field"> |