mirror of
https://github.com/flarum/core.git
synced 2025-07-30 13:10:24 +02:00
23 lines
621 B
JavaScript
23 lines
621 B
JavaScript
import Ember from 'ember';
|
|
|
|
var precompileTemplate = Ember.Handlebars.compile;
|
|
|
|
/**
|
|
A list item which contains a navigation link. The list item's `active`
|
|
property reflects whether or not the link is active.
|
|
*/
|
|
export default Ember.Component.extend({
|
|
layout: precompileTemplate('{{#link-to routeName}}{{fa-icon icon}} {{label}} <span class="count">{{badge}}</span>{{/link-to}}'),
|
|
tagName: 'li',
|
|
classNameBindings: ['active'],
|
|
|
|
icon: '',
|
|
label: '',
|
|
badge: '',
|
|
routeName: '',
|
|
|
|
active: Ember.computed('childViews.@each.active', function() {
|
|
return !!this.get('childViews').anyBy('active');
|
|
})
|
|
});
|