travis-web/app/components/show-more-button.coffee
2015-08-06 12:05:44 +02:00

20 lines
467 B
CoffeeScript

`import Ember from 'ember'`
ShowMoreButtonComponent = Ember.Component.extend
tagName: 'button'
classNames: ['button button--grey button--showmore']
classNameBindings: ['isLoading', 'showMore']
showMore: true
attributeBindings: ['disabled']
disabledBinding: 'isLoading'
buttonLabel: (->
if @get('isLoading') then 'Loading' else 'Show more'
).property('isLoading')
click: ->
this.attrs.showMore()
`export default ShowMoreButtonComponent`