Jack Mallers
7 years ago
8 changed files with 107 additions and 5 deletions
@ -0,0 +1,35 @@ |
|||
import React, { Component } from 'react' |
|||
import PropTypes from 'prop-types' |
|||
import AutosizeInput from 'react-input-autosize' |
|||
import CurrencyIcon from 'components/CurrencyIcon' |
|||
import styles from './StepTwo.scss' |
|||
|
|||
class StepTwo extends Component { |
|||
render() { |
|||
const { local_amt, setLocalAmount } = this.props |
|||
console.log('local_amt: ', local_amt) |
|||
return ( |
|||
<div className={styles.container}> |
|||
<label htmlFor='amount'> |
|||
<CurrencyIcon currency={'btc'} crypto={'btc'} /> |
|||
</label> |
|||
<input |
|||
autoFocus |
|||
type='number' |
|||
min='0' |
|||
max='0.16' |
|||
ref={input => this.input = input} |
|||
size='' |
|||
value={local_amt} |
|||
onChange={event => setLocalAmount(event.target.value)} |
|||
id='amount' |
|||
style={{ width: isNaN((local_amt.length + 1) * 55) ? 140 : (local_amt.length + 1) * 55 }} |
|||
/> |
|||
</div> |
|||
) |
|||
} |
|||
} |
|||
|
|||
StepTwo.propTypes = {} |
|||
|
|||
export default StepTwo |
@ -0,0 +1,39 @@ |
|||
@import '../../variables.scss'; |
|||
|
|||
.container { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: center; |
|||
align-items: center; |
|||
margin-bottom: 50px; |
|||
padding: 20px; |
|||
|
|||
label { |
|||
margin-left: -25px; |
|||
height: 200px; |
|||
color: $main; |
|||
|
|||
svg { |
|||
width: 65px; |
|||
height: 65px; |
|||
} |
|||
|
|||
svg[data-icon='ltc'] { |
|||
margin-right: 10px; |
|||
|
|||
g { |
|||
transform: scale(1.75) translate(-5px, -5px); |
|||
} |
|||
} |
|||
} |
|||
|
|||
input[type=number] { |
|||
color: $main; |
|||
width: 30px; |
|||
height: 200px; |
|||
font-size: 100px; |
|||
border: none; |
|||
outline: 0; |
|||
-webkit-appearance: none; |
|||
} |
|||
} |
Loading…
Reference in new issue