mirror of
https://github.com/flarum/core.git
synced 2025-08-01 14:10:37 +02:00
Working on responsive dropdown menu components.
This commit is contained in:
21
ember/app/components/dropdown-button.js
Normal file
21
ember/app/components/dropdown-button.js
Normal file
@@ -0,0 +1,21 @@
|
||||
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')
|
||||
});
|
Reference in New Issue
Block a user