Make the Remove button require confirmation.
This commit is contained in:
parent
66c3f7e444
commit
3082221c4d
|
@ -1,3 +1,4 @@
|
||||||
|
import {ConfirmButton} from '@holllo/gram';
|
||||||
import {html} from 'htm/preact';
|
import {html} from 'htm/preact';
|
||||||
import {Component} from 'preact';
|
import {Component} from 'preact';
|
||||||
import browser from 'webextension-polyfill';
|
import browser from 'webextension-polyfill';
|
||||||
|
@ -197,9 +198,14 @@ export class PageMain extends Component<Props, State> {
|
||||||
|
|
||||||
<div class="button-group">
|
<div class="button-group">
|
||||||
<button class="button" onClick=${this.saveBang}>Save</button>
|
<button class="button" onClick=${this.saveBang}>Save</button>
|
||||||
<button class="button destructive" onClick=${this.removeBang}>
|
<${ConfirmButton}
|
||||||
Remove
|
class="button destructive"
|
||||||
</button>
|
click=${this.removeBang}
|
||||||
|
confirmClass="confirm"
|
||||||
|
confirmText="Confirm Removal"
|
||||||
|
text="Remove ${this.state.editorBang.id}"
|
||||||
|
timeout=${5 * 1000}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
${validateError}
|
${validateError}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue