From d4557e85157303324336becb1b88a1cbf5ed1e0e Mon Sep 17 00:00:00 2001 From: apanizo Date: Wed, 3 Oct 2018 12:01:03 +0200 Subject: [PATCH] Implementation of adding new owner --- .../open/components/SafeOwnersForm/index.jsx | 99 ++++++++++--------- 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/src/routes/open/components/SafeOwnersForm/index.jsx b/src/routes/open/components/SafeOwnersForm/index.jsx index 5c33d296..234b692f 100644 --- a/src/routes/open/components/SafeOwnersForm/index.jsx +++ b/src/routes/open/components/SafeOwnersForm/index.jsx @@ -39,6 +39,9 @@ const styles = () => ({ padding: `${md} ${lg}`, }, owner: { + padding: `0 ${lg}`, + }, + header: { padding: `${sm} ${lg}`, }, name: { @@ -97,6 +100,12 @@ class SafeOwners extends React.Component { })) } + onAddOwner = () => { + this.setState(state => ({ + numOwners: state.numOwners + 1, + })) + } + render() { const { classes, errors, otherAccounts } = this.props const { numOwners } = this.state @@ -109,56 +118,58 @@ class SafeOwners extends React.Component { - + NAME ADDRESS - { [...Array(Number(numOwners))].map((x, index) => { - const addressName = getOwnerAddressBy(index) + + { [...Array(Number(numOwners))].map((x, index) => { + const addressName = getOwnerAddressBy(index) - return ( - - - - - - - - - ), - }} - type="text" - validate={getAddressValidators(otherAccounts, index)} - placeholder="Owner Address*" - text="Owner Address" - /> - - - { index > 0 && - - - - } - - - ) - }) } + return ( + + + + + + + + + ), + }} + type="text" + validate={getAddressValidators(otherAccounts, index)} + placeholder="Owner Address*" + text="Owner Address" + /> + + + { index > 0 && + + + + } + + + ) + }) } + -