mirror of
https://github.com/flarum/framework.git
synced 2025-01-07 19:13:37 +08:00
1f23cbaf20
Also rename title to label
28 lines
709 B
JavaScript
28 lines
709 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
items: null, // TaggedArray
|
|
layoutName: 'components/ui/controls/dropdown-button',
|
|
classNames: ['dropdown', 'btn-group'],
|
|
classNameBindings: ['itemCountClass', 'class'],
|
|
|
|
label: 'Controls',
|
|
icon: 'ellipsis-v',
|
|
buttonClass: 'btn btn-default',
|
|
menuClass: '',
|
|
|
|
dropdownMenuClass: function() {
|
|
return 'dropdown-menu '+this.get('menuClass');
|
|
}.property('menuClass'),
|
|
|
|
itemCountClass: function() {
|
|
return 'item-count-'+this.get('items.length');
|
|
}.property('items.length'),
|
|
|
|
actions: {
|
|
buttonClick: function() {
|
|
this.sendAction('buttonClick');
|
|
}
|
|
}
|
|
});
|