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