travis-web/app/components/hook-switch.coffee
2015-04-21 17:46:49 +02:00

18 lines
387 B
CoffeeScript

`import Ember from 'ember'`
HookSwitchComponent = Ember.Component.extend
tagName: 'a'
classNames: ['travis-switch', 'switch']
classNameBindings: ['active']
activeBinding: "hook.active"
click: ->
hook = @get('hook')
hook.toggle().then( (->), =>
@toggleProperty('hook.active')
@sendAction('onToggleError', hook)
)
`export default HookSwitchComponent`