Implementation of adding new owner
This commit is contained in:
parent
9e6c97aea8
commit
d4557e8515
|
@ -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<Props, State> {
|
|||
}))
|
||||
}
|
||||
|
||||
onAddOwner = () => {
|
||||
this.setState(state => ({
|
||||
numOwners: state.numOwners + 1,
|
||||
}))
|
||||
}
|
||||
|
||||
render() {
|
||||
const { classes, errors, otherAccounts } = this.props
|
||||
const { numOwners } = this.state
|
||||
|
@ -109,11 +118,12 @@ class SafeOwners extends React.Component<Props, State> {
|
|||
</Paragraph>
|
||||
</Block>
|
||||
<Hairline />
|
||||
<Row className={classes.owner}>
|
||||
<Row className={classes.header}>
|
||||
<Col xs={4}>NAME</Col>
|
||||
<Col xs={8}>ADDRESS</Col>
|
||||
</Row>
|
||||
<Hairline />
|
||||
<Block margin="md">
|
||||
{ [...Array(Number(numOwners))].map((x, index) => {
|
||||
const addressName = getOwnerAddressBy(index)
|
||||
|
||||
|
@ -157,8 +167,9 @@ class SafeOwners extends React.Component<Props, State> {
|
|||
</Row>
|
||||
)
|
||||
}) }
|
||||
</Block>
|
||||
<Row align="center" grow className={classes.add} margin="xl">
|
||||
<Button color="secondary">
|
||||
<Button color="secondary" onClick={this.onAddOwner}>
|
||||
+ ADD ANOTHER OWNER
|
||||
</Button>
|
||||
</Row>
|
||||
|
|
Loading…
Reference in New Issue