From 335083886c03c1d3813e44b07d720fb198c2b6b4 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Wed, 10 Jan 2018 11:06:29 -0800 Subject: [PATCH] fix(payment-form-errors): Move PayForm amount error message below the field This is consistent with the other field and avoids overlap formatting issues. Fixes #174 --- app/components/Form/PayForm.js | 12 ++++++------ app/components/Form/PayForm.scss | 23 ++++------------------- 2 files changed, 10 insertions(+), 25 deletions(-) diff --git a/app/components/Form/PayForm.js b/app/components/Form/PayForm.js index deb766de..24ff4ddd 100644 --- a/app/components/Form/PayForm.js +++ b/app/components/Form/PayForm.js @@ -49,11 +49,6 @@ class PayForm extends Component { {showPayLoadingScreen && }
-
- {showErrors.amount && - {errors.amount} - } -
@@ -75,6 +70,11 @@ class PayForm extends Component { readOnly={isLn} />
+
+ {showErrors.amount && + {errors.amount} + } +
{inputCaption} @@ -103,7 +103,7 @@ class PayForm extends Component { id='paymentRequest' /> -
+
{showErrors.payInput && {errors.payInput} } diff --git a/app/components/Form/PayForm.scss b/app/components/Form/PayForm.scss index 541b7c01..6f4c596f 100644 --- a/app/components/Form/PayForm.scss +++ b/app/components/Form/PayForm.scss @@ -14,8 +14,6 @@ color: $main; display: flex; justify-content: center; - min-height: 120px; - margin-bottom: 20px; min-height: 175px; border-bottom: 1px solid transparent; @@ -24,22 +22,9 @@ } &.error { - border-color: $red; + border-color: $red; } - .amountError { - position: absolute; - top: 0; - right: 0; - opacity: 0; - color: $red; - transition: all 0.25s ease; - - &.active { - opacity: 1; - } - } - label, input[type=number], input[type=text] { color: inherit; display: inline-block; @@ -61,7 +46,7 @@ } } } - + input[type=number], input[type=text] { width: 100px; font-size: 180px; @@ -136,7 +121,7 @@ } } -.payInputError { +.errorMessage { margin: 10px 0; min-height: 20px; color: $red; @@ -172,4 +157,4 @@ cursor: pointer; } } -} \ No newline at end of file +}