WA-235 Adding button Edit on confirmations section in Safe's view

This commit is contained in:
apanizo 2018-06-05 13:36:26 +02:00
parent 1e9199db32
commit 45a5d1c409
2 changed files with 13 additions and 2 deletions

View File

@ -4,12 +4,16 @@ import { ListItem } from 'material-ui/List'
import Avatar from 'material-ui/Avatar'
import DoneAll from 'material-ui-icons/DoneAll'
import ListItemText from '~/components/List/ListItemText'
import Button from '~/components/layout/Button'
type Props = {
confirmations: number,
onEditThreshold: () => void,
}
const Confirmations = ({ confirmations }: Props) => (
const EDIT_THRESHOLD_BUTTON_TEXT = 'EDIT'
const Confirmations = ({ confirmations, onEditThreshold }: Props) => (
<ListItem>
<Avatar>
<DoneAll />
@ -19,6 +23,13 @@ const Confirmations = ({ confirmations }: Props) => (
secondary={`${confirmations} required confirmations per transaction`}
cut
/>
<Button
variant="raised"
color="primary"
onClick={onEditThreshold}
>
{EDIT_THRESHOLD_BUTTON_TEXT}
</Button>
</ListItem>
)

View File

@ -69,7 +69,7 @@ class GnoSafe extends React.PureComponent<SafeProps, State> {
<List style={listStyle}>
<Balance balance={balance} />
<Owners owners={safe.owners} />
<Confirmations confirmations={safe.get('confirmations')} />
<Confirmations confirmations={safe.get('confirmations')} onEditThreshold={() => {}} />
<Address address={safe.get('address')} />
<DailyLimit balance={balance} dailyLimit={safe.get('dailyLimit')} onWithdrawn={this.onWithdrawn} />
<MultisigTx balance={balance} onAddTx={this.onAddTx} onSeeTxs={this.onListTransactions} />