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

View File

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