Ghost/core/client/components/gh-dropdown-button.js

17 lines
461 B
JavaScript
Raw Normal View History

2014-09-28 19:39:25 +04:00
import DropdownMixin from 'ghost/mixins/dropdown-mixin';
var DropdownButton = Ember.Component.extend(DropdownMixin, {
tagName: 'button',
// matches with the dropdown this button toggles
2014-09-28 19:39:25 +04:00
dropdownName: null,
// Notify dropdown service this dropdown should be toggled
2014-09-28 19:39:25 +04:00
click: function (event) {
this._super(event);
this.get('dropdown').toggleDropdown(this.get('dropdownName'), this);
}
});
export default DropdownButton;