0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/client/app/components/gh-dropdown-button.js

20 lines
539 B
JavaScript
Raw Normal View History

2015-02-12 23:22:32 -05:00
import Ember from 'ember';
2014-09-28 10:39:25 -05:00
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
var DropdownButton = Ember.Component.extend(DropdownMixin, {
tagName: 'button',
2015-03-07 15:35:45 -05:00
attributeBindings: 'role',
role: 'button',
// matches with the dropdown this button toggles
2014-09-28 10:39:25 -05:00
dropdownName: null,
// Notify dropdown service this dropdown should be toggled
2014-09-28 10:39:25 -05:00
click: function (event) {
this._super(event);
this.get('dropdown').toggleDropdown(this.get('dropdownName'), this);
}
});
export default DropdownButton;