Search button

This commit is contained in:
Matthew Dillon 2015-06-09 14:31:09 -08:00
parent 4776bb869c
commit eb233ddca1
3 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,13 @@
import Ember from 'ember';
export default Ember.Component.extend({
isLoading: false,
buttonText: 'Search',
actions: {
showLoading: function() {
if (!this.get('isLoading')) {
this.sendAction('action');
}
}
}
});

View file

@ -0,0 +1,7 @@
<a class="action button-gray smaller right" {{action 'showLoading'}}>
{{#if isLoading}}
LOADING
{{else}}
{{buttonText}}
{{/if}}
</a>