Search button
This commit is contained in:
parent
4776bb869c
commit
eb233ddca1
3 changed files with 39 additions and 0 deletions
13
app/pods/components/search-button/component.js
Normal file
13
app/pods/components/search-button/component.js
Normal 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');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
7
app/pods/components/search-button/template.hbs
Normal file
7
app/pods/components/search-button/template.hbs
Normal file
|
@ -0,0 +1,7 @@
|
|||
<a class="action button-gray smaller right" {{action 'showLoading'}}>
|
||||
{{#if isLoading}}
|
||||
LOADING
|
||||
{{else}}
|
||||
{{buttonText}}
|
||||
{{/if}}
|
||||
</a>
|
Reference in a new issue