add spacings to each input in load safe form

This commit is contained in:
Mikhail Mikheev 2019-04-26 19:01:49 +04:00
parent d08be2e8e4
commit 12f8745af1
2 changed files with 17 additions and 17 deletions

View File

@ -26,9 +26,7 @@ const styles = () => ({
root: { root: {
display: 'flex', display: 'flex',
maxWidth: '460px', maxWidth: '460px',
'&:last-child': { marginTop: '12px',
marginTop: '12px',
},
}, },
check: { check: {
color: '#03AE60', color: '#03AE60',
@ -85,9 +83,8 @@ const Details = ({ classes, errors }: Props) => (
<React.Fragment> <React.Fragment>
<Block margin="sm"> <Block margin="sm">
<Paragraph noMargin size="md" color="primary"> <Paragraph noMargin size="md" color="primary">
Adding an existing Safe only requires the Safe address. Optionally you can give it a name. Adding an existing Safe only requires the Safe address. Optionally you can give it a name. In case your
In case your connected client is not the owner of the Safe, the interface will essentially provide you a connected client is not the owner of the Safe, the interface will essentially provide you a read-only view.
read-only view.
</Paragraph> </Paragraph>
</Block> </Block>
<Block className={classes.root}> <Block className={classes.root}>
@ -104,13 +101,15 @@ const Details = ({ classes, errors }: Props) => (
<Field <Field
name={FIELD_LOAD_ADDRESS} name={FIELD_LOAD_ADDRESS}
component={TextField} component={TextField}
inputAdornment={noErrorsOn(FIELD_LOAD_ADDRESS, errors) && { inputAdornment={
endAdornment: ( noErrorsOn(FIELD_LOAD_ADDRESS, errors) && {
<InputAdornment position="end"> endAdornment: (
<CheckCircle className={classes.check} /> <InputAdornment position="end">
</InputAdornment> <CheckCircle className={classes.check} />
), </InputAdornment>
}} ),
}
}
type="text" type="text"
validate={composeValidators(required, mustBeEthereumAddress)} validate={composeValidators(required, mustBeEthereumAddress)}
placeholder="Safe Address*" placeholder="Safe Address*"
@ -130,5 +129,4 @@ const DetailsPage = () => (controls: React$Node, { errors }: Object) => (
</React.Fragment> </React.Fragment>
) )
export default DetailsPage export default DetailsPage

View File

@ -3,7 +3,9 @@ import * as React from 'react'
import { withStyles } from '@material-ui/core/styles' import { withStyles } from '@material-ui/core/styles'
import Field from '~/components/forms/Field' import Field from '~/components/forms/Field'
import TextField from '~/components/forms/TextField' import TextField from '~/components/forms/TextField'
import { required, composeValidators, uniqueAddress, mustBeEthereumAddress, noErrorsOn } from '~/components/forms/validator' import {
required, composeValidators, uniqueAddress, mustBeEthereumAddress, noErrorsOn,
} from '~/components/forms/validator'
import Block from '~/components/layout/Block' import Block from '~/components/layout/Block'
import Button from '~/components/layout/Button' import Button from '~/components/layout/Button'
import Row from '~/components/layout/Row' import Row from '~/components/layout/Row'
@ -167,8 +169,8 @@ class SafeOwners extends React.Component<Props, State> {
/> />
</Col> </Col>
<Col xs={1} center="xs" middle="xs" className={classes.remove}> <Col xs={1} center="xs" middle="xs" className={classes.remove}>
{ index > 0 && { index > 0
<Img src={trash} height={20} alt="Delete" onClick={this.onRemoveRow(index)} /> && <Img src={trash} height={20} alt="Delete" onClick={this.onRemoveRow(index)} />
} }
</Col> </Col>
</Row> </Row>