Ghost/core/client/components/gh-popover-button.js
Matt Enlow 1f608cf5ab Add open class to popover buttons
Ref#3603
- Popover Buttons now have an `open` class applied to them when their popover is open
- The open class is removed from the popover button at the start of the popover's fadeout
- Consolidated common code into popover-mixin
2014-08-06 18:23:03 -06:00

14 lines
448 B
JavaScript

import PopoverMixin from 'ghost/mixins/popover-mixin';
var PopoverButton = Ember.Component.extend(PopoverMixin, {
tagName: 'button',
/*matches with the popover this button toggles*/
popoverName: null,
/*Notify popover service this popover should be toggled*/
click: function (event) {
this._super(event);
this.get('popover').togglePopover(this.get('popoverName'), this);
}
});
export default PopoverButton;