Browse Source

feature(sendcoins): blinking cursor to show editing state for amount when they are not using LN

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
cfc41382e6
  1. 14
      app/routes/app/components/components/Form/components/Pay/Pay.js

14
app/routes/app/components/components/Form/components/Pay/Pay.js

@ -1,11 +1,17 @@
import React from 'react'
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { FaBolt, FaChain } from 'react-icons/lib/fa'
import CurrencyIcon from '../../../../../../../components/CurrencyIcon'
import { btc } from '../../../../../../../utils'
import styles from './Pay.scss'
const Pay = ({
class Pay extends Component {
componentDidUpdate() {
if (this.props.paymentType !== 'lnd') { this.amountInput.focus() }
}
render() {
const {
paymentType,
setPaymentType,
invoiceAmount,
@ -18,7 +24,7 @@ const Pay = ({
currency,
crypto,
close
}) => {
} = this.props
const payClicked = () => {
if (payment_request.length !== 124) { return }
@ -48,6 +54,7 @@ const Pay = ({
</label>
<input
type='text'
ref={(input) => this.amountInput = input}
size=''
style={
paymentType === 'ln' ?
@ -118,6 +125,7 @@ const Pay = ({
</div>
)
}
}
Pay.propTypes = {
amount: PropTypes.oneOfType([

Loading…
Cancel
Save