add amount field

This commit is contained in:
mmv 2019-05-21 12:35:12 +04:00
parent e0be6094d3
commit 7bac5ae822
3 changed files with 19 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import Img from '~/components/layout/Img'
import Paragraph from '~/components/layout/Paragraph' import Paragraph from '~/components/layout/Paragraph'
import SelectField from '~/components/forms/SelectField' import SelectField from '~/components/forms/SelectField'
import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils' import { setImageToPlaceholder } from '~/routes/safe/components/Balances/utils'
import { composeValidators, required } from '~/components/forms/validator' import { required } from '~/components/forms/validator'
import { type Token } from '~/logic/tokens/store/model/token' import { type Token } from '~/logic/tokens/store/model/token'
import { selectedTokenStyles, selectStyles } from './style' import { selectedTokenStyles, selectStyles } from './style'
@ -52,7 +52,7 @@ const TokenSelectField = ({ tokens, classes }: SelectFieldProps) => (
name="token" name="token"
component={SelectField} component={SelectField}
classes={{ selectMenu: classes.selectMenu }} classes={{ selectMenu: classes.selectMenu }}
validate={composeValidators(required)} validate={required}
renderValue={token => <SelectedTokenStyled token={token} />} renderValue={token => <SelectedTokenStyled token={token} />}
initialValue="" initialValue=""
displayEmpty displayEmpty

View File

@ -142,6 +142,22 @@ const SendFunds = ({
<TokenSelectField tokens={tokens} /> <TokenSelectField tokens={tokens} />
</Col> </Col>
</Row> </Row>
<Row>
<Col layout="column">
<Paragraph size="md" color="disabled" style={{ letterSpacing: '-0.5px' }}>
Amount
</Paragraph>
<Field
name="amount"
component={TextField}
type="text"
validate={composeValidators(required)}
placeholder="Amount*"
text="Amount*"
className={classes.addressInput}
/>
</Col>
</Row>
</React.Fragment> </React.Fragment>
)} )}
</GnoForm> </GnoForm>