Ghost/ghost/admin/app/components/gh-content-cover.js

29 lines
519 B
JavaScript
Raw Normal View History

/*
Implements a div for covering the page content
when in a menu context that, for example,
should be closed when the user clicks elsewhere.
Example:
```
{{gh-content-cover onClick="closeMenus" onMouseEnter="closeAutoNav"}}
```
**/
import Component from 'ember-component';
export default Component.extend({
2015-05-24 08:47:23 +03:00
classNames: ['content-cover'],
onClick: null,
onMouseEnter: null,
click() {
2015-05-24 08:47:23 +03:00
this.sendAction('onClick');
},
mouseEnter() {
2015-05-24 08:47:23 +03:00
this.sendAction('onMouseEnter');
}
});