mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
1f608cf5ab
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
14 lines
448 B
JavaScript
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; |