This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
hymenobacterdotinfo/app/pods/components/delete-button/component.js
Matthew Dillon 20a6707144 Refactor delete button
Fixes #50
2015-11-13 14:16:50 -07:00

16 lines
332 B
JavaScript

import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'button',
classNames: ["button-red", "smaller", "delete"],
showConfirmDelete: false,
click: function() {
if (!this.get('showConfirmDelete')) {
this.set('showConfirmDelete', true);
} else {
this.attrs.delete();
}
},
});