mirror of
https://github.com/flarum/framework.git
synced 2025-02-25 08:24:09 +08:00
22 lines
588 B
JavaScript
22 lines
588 B
JavaScript
![]() |
import Ember from 'ember';
|
||
|
|
||
|
export default Ember.Component.extend({
|
||
|
items: null, // NamedContainerView/Menu
|
||
|
layoutName: 'components/dropdown-button',
|
||
|
classNames: ['dropdown', 'btn-group'],
|
||
|
classNameBindings: ['itemCountClass'],
|
||
|
|
||
|
title: 'Controls',
|
||
|
icon: 'ellipsis-v',
|
||
|
buttonClass: 'btn-default',
|
||
|
menuClass: 'pull-right',
|
||
|
|
||
|
dropdownMenuClass: function() {
|
||
|
return 'dropdown-menu '+this.get('menuClass');
|
||
|
}.property('menuClass'),
|
||
|
|
||
|
itemCountClass: function() {
|
||
|
return 'item-count-'+this.get('items.length');
|
||
|
}.property('items')
|
||
|
});
|