From 4c139dae053c3c023934bcd4a4d3587a4a2293a2 Mon Sep 17 00:00:00 2001 From: George Lima Date: Wed, 19 Dec 2018 18:41:43 -0300 Subject: [PATCH] [WIP] feature: add SendView --- app/views/send.js | 119 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 117 insertions(+), 2 deletions(-) diff --git a/app/views/send.js b/app/views/send.js index a60df9c..f2ab094 100644 --- a/app/views/send.js +++ b/app/views/send.js @@ -1,5 +1,120 @@ // @flow +import React, { PureComponent, Fragment } from 'react'; +import styled from 'styled-components'; -import React from 'react'; +import { InputLabelComponent } from '../components/input-label'; +import { InputComponent } from '../components/input'; +import { TextComponent } from '../components/text'; +import { SelectComponent } from '../components/select'; -export const SendView = () =>
send
; +const Wrapper = styled.div` + margin-top: ${props => props.theme.layoutContentPaddingTop}; +`; + +const ShowFeeButton = styled.button` + background: none; + border: none; + cursor: pointer; + width: 100%; + color: ${props => props.theme.colors.text}; + outline: none; + + &:hover { + text-decoration: underline; + } +`; + +type Props = {}; +type State = { + showFee: boolean, + from: string, + amount: number, + to: string, + fee: number, + memo: string, +}; + +export class SendView extends PureComponent { + state = { + showFee: false, + from: '', + amount: 0, + to: '', + fee: 0, + memo: '', + }; + + handleChange = (field: string) => (value: string) => { + this.setState(() => ({ + [field]: value, + })); + }; + + render() { + const { + showFee, from, amount, to, memo, fee, + } = this.state; + + return ( + + + + + + + + + + + this.setState(state => ({ showFee: !state.showFee }))} + > + + + + {showFee && ( + + + + + )} + + ); + } +}