Merge pull request #12823 from influxdata/fix/token-delete-confirm

Add confirmation to the delete button on tokens
pull/12827/head
Palakp41 2019-03-21 12:44:21 -07:00 committed by GitHub
commit b6ec3817c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 10 deletions

View File

@ -6,13 +6,8 @@ import {connect} from 'react-redux'
import {deleteAuthorization} from 'src/authorizations/actions'
// Components
import {
Alignment,
Button,
ComponentSize,
ComponentColor,
} from '@influxdata/clockface'
import {IndexList, ComponentSpacer} from 'src/clockface'
import {Alignment, ComponentSize} from '@influxdata/clockface'
import {IndexList, ComponentSpacer, ConfirmationButton} from 'src/clockface'
// Types
import {Authorization} from '@influxdata/influx'
@ -46,11 +41,11 @@ class TokenRow extends PureComponent<Props> {
<IndexList.Cell>{status}</IndexList.Cell>
<IndexList.Cell alignment={Alignment.Right} revealOnHover={true}>
<ComponentSpacer align={Alignment.Right}>
<Button
<ConfirmationButton
size={ComponentSize.ExtraSmall}
color={ComponentColor.Danger}
text="Delete"
onClick={this.handleDelete}
confirmText="Confirm"
onConfirm={this.handleDelete}
/>
</ComponentSpacer>
</IndexList.Cell>