Refactor OpenSafe container
This commit is contained in:
parent
1c3c548284
commit
6a76217020
|
@ -35,7 +35,7 @@ class TextField extends React.PureComponent<TextFieldProps> {
|
||||||
const underline = meta.active || (meta.visited && !meta.valid)
|
const underline = meta.active || (meta.visited && !meta.valid)
|
||||||
|
|
||||||
const inputRoot = helperText ? classes.root : undefined
|
const inputRoot = helperText ? classes.root : undefined
|
||||||
const inputProps = { ...restInput, autoComplete: 'off' }
|
const inputProps = { ...restInput, autoComplete: 'false' }
|
||||||
const inputRootProps = { disableUnderline: !underline, className: inputRoot }
|
const inputRootProps = { disableUnderline: !underline, className: inputRoot }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -2,22 +2,33 @@
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import { withStyles } from '@material-ui/core/styles'
|
import { withStyles } from '@material-ui/core/styles'
|
||||||
import Paper from '@material-ui/core/Paper'
|
import Paper from '@material-ui/core/Paper'
|
||||||
|
import Block from '~/components/layout/Block'
|
||||||
|
import { lg } from '~/theme/variables'
|
||||||
|
|
||||||
const styles = () => ({
|
const styles = () => ({
|
||||||
root: {
|
root: {
|
||||||
margin: '10px',
|
margin: '10px',
|
||||||
maxWidth: '770px',
|
maxWidth: '770px',
|
||||||
},
|
},
|
||||||
|
container: {
|
||||||
|
maxWidth: '600px',
|
||||||
|
letterSpacing: '-0.5px',
|
||||||
|
padding: lg,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
classes: Object,
|
classes: Object,
|
||||||
children: React$Node,
|
children: React$Node,
|
||||||
|
controls: React$Node,
|
||||||
}
|
}
|
||||||
|
|
||||||
const OpenPaper = ({ classes, children }: Props) => (
|
const OpenPaper = ({ classes, children, controls }: Props) => (
|
||||||
<Paper className={classes.root} elevation={1}>
|
<Paper className={classes.root} elevation={1}>
|
||||||
{children}
|
<Block className={classes.container}>
|
||||||
|
{children}
|
||||||
|
</Block>
|
||||||
|
{ controls }
|
||||||
</Paper>
|
</Paper>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
import * as React from 'react'
|
import * as React from 'react'
|
||||||
import Block from '~/components/layout/Block'
|
import OpenPaper from '~/routes/open/components/OpenPaper'
|
||||||
import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor'
|
import { getAccountsFrom } from '~/routes/open/utils/safeDataExtractor'
|
||||||
import Owners from './Owners'
|
import Owners from './Owners'
|
||||||
import Confirmations from './Confirmations'
|
import Confirmations from './Confirmations'
|
||||||
|
@ -18,10 +18,12 @@ export const safeFieldsValidation = (values: Object) => {
|
||||||
return errors
|
return errors
|
||||||
}
|
}
|
||||||
|
|
||||||
export default () => (constrols: React$Node, { values }: Object) => (
|
const SafeRestPage = () => (controls: React$Node, { values }: Object) => (
|
||||||
<Block margin="md">
|
<OpenPaper controls={controls}>
|
||||||
<Owners numOwners={values.owners} otherAccounts={getAccountsFrom(values)} />
|
<Owners numOwners={values.owners} otherAccounts={getAccountsFrom(values)} />
|
||||||
<Confirmations />
|
<Confirmations />
|
||||||
<DailyLimit />
|
<DailyLimit />
|
||||||
</Block>
|
</OpenPaper>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
export default SafeRestPage
|
||||||
|
|
Loading…
Reference in New Issue