From 6a762170206b7a45ce69589919c6a2f841336d79 Mon Sep 17 00:00:00 2001 From: apanizo Date: Tue, 25 Sep 2018 10:36:47 +0200 Subject: [PATCH] Refactor OpenSafe container --- src/components/forms/TextField/index.jsx | 2 +- src/routes/open/components/OpenPaper/index.jsx | 15 +++++++++++++-- src/routes/open/components/SafeForm/index.jsx | 10 ++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/components/forms/TextField/index.jsx b/src/components/forms/TextField/index.jsx index 0d1117f4..f9316365 100644 --- a/src/components/forms/TextField/index.jsx +++ b/src/components/forms/TextField/index.jsx @@ -35,7 +35,7 @@ class TextField extends React.PureComponent { const underline = meta.active || (meta.visited && !meta.valid) const inputRoot = helperText ? classes.root : undefined - const inputProps = { ...restInput, autoComplete: 'off' } + const inputProps = { ...restInput, autoComplete: 'false' } const inputRootProps = { disableUnderline: !underline, className: inputRoot } return ( diff --git a/src/routes/open/components/OpenPaper/index.jsx b/src/routes/open/components/OpenPaper/index.jsx index a00c4ba6..99ad9c8e 100644 --- a/src/routes/open/components/OpenPaper/index.jsx +++ b/src/routes/open/components/OpenPaper/index.jsx @@ -2,22 +2,33 @@ import * as React from 'react' import { withStyles } from '@material-ui/core/styles' import Paper from '@material-ui/core/Paper' +import Block from '~/components/layout/Block' +import { lg } from '~/theme/variables' const styles = () => ({ root: { margin: '10px', maxWidth: '770px', }, + container: { + maxWidth: '600px', + letterSpacing: '-0.5px', + padding: lg, + }, }) type Props = { classes: Object, children: React$Node, + controls: React$Node, } -const OpenPaper = ({ classes, children }: Props) => ( +const OpenPaper = ({ classes, children, controls }: Props) => ( - {children} + + {children} + + { controls } ) diff --git a/src/routes/open/components/SafeForm/index.jsx b/src/routes/open/components/SafeForm/index.jsx index cda88e40..a94fedca 100644 --- a/src/routes/open/components/SafeForm/index.jsx +++ b/src/routes/open/components/SafeForm/index.jsx @@ -1,6 +1,6 @@ // @flow 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 Owners from './Owners' import Confirmations from './Confirmations' @@ -18,10 +18,12 @@ export const safeFieldsValidation = (values: Object) => { return errors } -export default () => (constrols: React$Node, { values }: Object) => ( - +const SafeRestPage = () => (controls: React$Node, { values }: Object) => ( + - + ) + +export default SafeRestPage