Browse Source

Merge branch 'master' into fix/number-input-pinwheel

renovate/lint-staged-8.x
JimmyMow 7 years ago
committed by GitHub
parent
commit
088da1adae
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      app/components/Form/PayForm.js
  2. 29
      app/components/Form/PayForm.scss
  3. 1
      app/main.dev.js

14
app/components/Form/PayForm.js

@ -49,11 +49,6 @@ class PayForm extends Component {
{showPayLoadingScreen && <LoadingBolt />} {showPayLoadingScreen && <LoadingBolt />}
<section className={`${styles.amountContainer} ${isLn ? styles.ln : ''} ${showErrors.amount && styles.error}`}> <section className={`${styles.amountContainer} ${isLn ? styles.ln : ''} ${showErrors.amount && styles.error}`}>
<section className={`${styles.amountError} ${showErrors.amount && styles.active}`}>
{showErrors.amount &&
<span>{errors.amount}</span>
}
</section>
<label htmlFor='amount'> <label htmlFor='amount'>
<CurrencyIcon currency={currency} crypto={crypto} /> <CurrencyIcon currency={currency} crypto={crypto} />
</label> </label>
@ -66,7 +61,7 @@ class PayForm extends Component {
isLn ? isLn ?
{ width: '75%', fontSize: '85px' } { width: '75%', fontSize: '85px' }
: :
{ width: `${amount.length > 1 ? (amount.length * 20) - 5 : 25}%`, fontSize: `${190 - (amount.length ** 2)}px` } { width: `${amount.length > 1 ? (amount.length * 20) - 5 : 35}%`, fontSize: `${190 - (amount.length ** 2)}px` }
} }
value={currentAmount} value={currentAmount}
onChange={event => setPayAmount(event.target.value)} onChange={event => setPayAmount(event.target.value)}
@ -75,6 +70,11 @@ class PayForm extends Component {
readOnly={isLn} readOnly={isLn}
/> />
</section> </section>
<section className={`${styles.errorMessage} ${showErrors.amount && styles.active}`}>
{showErrors.amount &&
<span>{errors.amount}</span>
}
</section>
<div className={styles.inputContainer}> <div className={styles.inputContainer}>
<div className={styles.info}> <div className={styles.info}>
<span>{inputCaption}</span> <span>{inputCaption}</span>
@ -103,7 +103,7 @@ class PayForm extends Component {
id='paymentRequest' id='paymentRequest'
/> />
</section> </section>
<section className={`${styles.payInputError} ${showErrors.payInput && styles.active}`}> <section className={`${styles.errorMessage} ${showErrors.payInput && styles.active}`}>
{showErrors.payInput && {showErrors.payInput &&
<span>{errors.payInput}</span> <span>{errors.payInput}</span>
} }

29
app/components/Form/PayForm.scss

@ -14,8 +14,6 @@
color: $main; color: $main;
display: flex; display: flex;
justify-content: center; justify-content: center;
min-height: 120px;
margin-bottom: 20px;
min-height: 175px; min-height: 175px;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
@ -27,19 +25,6 @@
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] { label, input[type=number], input[type=text] {
color: inherit; color: inherit;
display: inline-block; display: inline-block;
@ -70,6 +55,12 @@
-webkit-appearance: none; -webkit-appearance: none;
font-weight: 200; font-weight: 200;
} }
input[type=number] {
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
-webkit-appearance: none;
}
}
} }
.inputContainer { .inputContainer {
@ -136,7 +127,7 @@
} }
} }
.payInputError { .errorMessage {
margin: 10px 0; margin: 10px 0;
min-height: 20px; min-height: 20px;
color: $red; color: $red;
@ -173,9 +164,3 @@
} }
} }
} }
input[type=number] {
&::-webkit-inner-spin-button, &::-webkit-outer-spin-button {
-webkit-appearance: none;
}
}

1
app/main.dev.js

@ -82,7 +82,6 @@ app.on('ready', async () => {
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
show: false, show: false,
frame: false, frame: false,
nodeIntegration: false,
icon: icon icon: icon
}) })

Loading…
Cancel
Save