parent
eb4537afb1
commit
6f01fbf00f
5 changed files with 42 additions and 0 deletions
23
app/components/confirm-button.js
Normal file
23
app/components/confirm-button.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend({
|
||||
tagName: 'span',
|
||||
showConfirm: false,
|
||||
initialLabel: 'LABEL',
|
||||
confirmLabel: 'CONFIRM LABEL',
|
||||
cancelLabel: 'Cancel',
|
||||
|
||||
actions: {
|
||||
initial() {
|
||||
this.set('showConfirm', true);
|
||||
},
|
||||
|
||||
cancel() {
|
||||
this.set('showConfirm', false);
|
||||
},
|
||||
|
||||
confirm() {
|
||||
this.get('onClick')();
|
||||
},
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue