Files
2017-12-21 11:42:41 +01:00

21 lines
596 B
CoffeeScript

import Ember from 'ember'
export default Ember.Component.extend
css_type: 'semantic'
classNameBindings: ['css_type_classes']
css_type_classes: Ember.computed 'css_type', ->
switch @get('css_type')
when 'semantic' then 'dunlop-breadcrumbs ui container bottom attached block header'
else 'dunlop-breadcrumbs'
items: Ember.computed -> Ember.A([]) # emberx-select example
actions:
registerItem: (item) ->
item.set('isFirst', true) unless @get('items.length')
@get('items').push(item)
unregisterItem: (item) ->
@get('items').removeObject(item)