travis-web/app/views/show-more-button.coffee
2015-03-10 17:21:18 +01:00

22 lines
504 B
CoffeeScript

`import Ember from 'ember'`
View = Ember.View.extend
tagName: 'button'
classNames: ['button button--grey button--showmore']
classNameBindings: ['isLoading', 'showMore']
showMore: true
attributeBindings: ['disabled']
isLoadingBinding: 'controller.isLoading'
templateName: 'show-more-button'
disabledBinding: 'isLoading'
label: (->
if @get('isLoading') then 'Loading' else 'Show more'
).property('isLoading')
click: ->
@get('controller').showMore()
`export default View`