add recepient input

This commit is contained in:
mmv 2019-04-30 17:13:07 +04:00
parent b1fe6a7db0
commit 1b25a6c29e
1 changed files with 73 additions and 51 deletions

View File

@ -10,13 +10,15 @@ import Row from '~/components/layout/Row'
import GnoForm from '~/components/forms/GnoForm' import GnoForm from '~/components/forms/GnoForm'
import Link from '~/components/layout/Link' import Link from '~/components/layout/Link'
import Col from '~/components/layout/Col' import Col from '~/components/layout/Col'
import Field from '~/components/forms/Field'
import TextField from '~/components/forms/TextField'
import Block from '~/components/layout/Block' import Block from '~/components/layout/Block'
import Bold from '~/components/layout/Bold' import Bold from '~/components/layout/Bold'
import Hairline from '~/components/layout/Hairline' import Hairline from '~/components/layout/Hairline'
import { import {
lg, md, sm, secondary, xs, lg, md, sm, secondary, xs,
} from '~/theme/variables' } from '~/theme/variables'
import { composeValidators, required, mustBeEthereumAddress } from '~/components/forms/validator'
import { copyToClipboard } from '~/utils/clipboard' import { copyToClipboard } from '~/utils/clipboard'
import ArrowDown from './assets/arrow-down.svg' import ArrowDown from './assets/arrow-down.svg'
@ -65,7 +67,10 @@ type Props = {
const SendFunds = ({ const SendFunds = ({
classes, onClose, safeAddress, etherScanLink, safeName, ethBalance, classes, onClose, safeAddress, etherScanLink, safeName, ethBalance,
}: Props) => ( }: Props) => {
const handleSubmit = () => {}
return (
<React.Fragment> <React.Fragment>
<Row align="center" grow className={classes.heading}> <Row align="center" grow className={classes.heading}>
<Paragraph weight="bolder" className={classes.manage} noMargin> <Paragraph weight="bolder" className={classes.manage} noMargin>
@ -104,7 +109,7 @@ ETH
</Block> </Block>
</Col> </Col>
</Row> </Row>
<Row> <Row margin="md">
<Col xs={1}> <Col xs={1}>
<img src={ArrowDown} alt="Arrow Down" style={{ marginLeft: '8px' }} /> <img src={ArrowDown} alt="Arrow Down" style={{ marginLeft: '8px' }} />
</Col> </Col>
@ -112,9 +117,26 @@ ETH
<Hairline /> <Hairline />
</Col> </Col>
</Row> </Row>
<GnoForm>{() => <Row />}</GnoForm> <GnoForm onSubmit={handleSubmit}>
{() => (
<Row>
<Col xs={12}>
<Field
name="address"
component={TextField}
type="text"
validate={composeValidators(required, mustBeEthereumAddress)}
placeholder="Recipient*"
text="Recipient*"
className={classes.addressInput}
/>
</Col>
</Row>
)}
</GnoForm>
</Block> </Block>
</React.Fragment> </React.Fragment>
) )
}
export default withStyles(styles)(SendFunds) export default withStyles(styles)(SendFunds)