From 3d8795413fb77979d3a6065c7580f195aaa45d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= Date: Thu, 23 May 2019 11:38:21 +0200 Subject: [PATCH] Add new owner data --- .../AddOwnerModal/screens/OwnerForm/index.jsx | 119 ++++++++++++++++++ .../AddOwnerModal/screens/OwnerForm/style.js | 32 +++++ 2 files changed, 151 insertions(+) create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx create mode 100644 src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx new file mode 100644 index 00000000..d33817be --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/index.jsx @@ -0,0 +1,119 @@ +// @flow +import React from 'react' +import { withStyles } from '@material-ui/core/styles' +import Close from '@material-ui/icons/Close' +import IconButton from '@material-ui/core/IconButton' +import Paragraph from '~/components/layout/Paragraph' +import Row from '~/components/layout/Row' +import GnoForm from '~/components/forms/GnoForm' +import Col from '~/components/layout/Col' +import Button from '~/components/layout/Button' +import Block from '~/components/layout/Block' +import Hairline from '~/components/layout/Hairline' +import Field from '~/components/forms/Field' +import TextField from '~/components/forms/TextField' +import { + composeValidators, + required, + mustBeEthereumAddress, + minMaxLength, + noErrorsOn, +} from '~/components/forms/validator' +import { styles } from './style' + +type Props = { + onClose: () => void, + classes: Object, + safeAddress: string, + safeName: string, + onSubmit: Function, +} + +const OwnerForm = ({ + classes, + onClose, + safeAddress, + safeName, + onSubmit, +}: Props) => { + const handleSubmit = (values) => { + console.log(values) + onSubmit(values) + } + + return ( + + + + Add new owner + + 1 of 3 + + + + + + + {(...args) => { + const formState = args[2] + + return ( + + + + + Add a new owner to the active Safe + + + + + + + + + + + + + + + + + + + + ) + }} + + + ) +} + +export default withStyles(styles)(OwnerForm) diff --git a/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js new file mode 100644 index 00000000..3a5123bd --- /dev/null +++ b/src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/screens/OwnerForm/style.js @@ -0,0 +1,32 @@ +// @flow +import { lg, md, sm } from '~/theme/variables' + +export const styles = () => ({ + heading: { + padding: `${sm} ${lg}`, + justifyContent: 'flex-start', + boxSizing: 'border-box', + maxHeight: '75px', + }, + annotation: { + letterSpacing: '-1px', + color: '#a2a8ba', + marginRight: 'auto', + marginLeft: '20px', + }, + manage: { + fontSize: '24px', + }, + closeIcon: { + height: '35px', + width: '35px', + }, + formContainer: { + padding: `${md} ${lg}`, + minHeight: '340px', + }, + buttonRow: { + height: '84px', + justifyContent: 'center', + }, +})